createUri |
RESTDataConnector.createUri( endpoint ) |
Returns a URI to the specified endpoint in the API. |
setDefaultAuthentication |
RESTDataConnector.setDefaultAuthentication( auth ) |
Set the default HTTP authentication for the REST API call |
getDefaultAuthentication |
RESTDataConnector.getDefaultAuthentication( ) |
Returns the Data Connector's default HTTP authentication |
setDefaultHeaders |
RESTDataConnector.setDefaultHeaders( defaultHeaders ) |
Sets the default headers object for a given name for API calls. |
getDefaultHeaders |
RESTDataConnector.getDefaultHeaders( ) |
Returns the default headers object for API calls. |
delete |
RESTDataConnector.delete( uri [, options ] ) |
Performs an authenticated DELETE request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request. |
setErrorHandler |
RESTDataConnector.setErrorHandler( function ) |
Override the default error handler for the RestDataConnector. |
get |
RESTDataConnector.get( uri [, options ] ) |
Performs an authenticated GET request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request. |
getDefaultHeader |
RESTDataConnector.getDefaultHeader( header ) |
Returns the default header value for a given name. |
head |
RESTDataConnector.head( uri [, options ] ) |
Performs an authenticated HEAD request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request. |
patch |
RESTDataConnector.patch( uri , body [, options ] ) |
Performs an authenticated PATCH request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request. |
post |
RESTDataConnector.post( uri , body [, options ] ) |
Performs an authenticated POST request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request. |
put |
RESTDataConnector.put( uri , body [, options ] ) |
Performs an authenticated PUT request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request. |
removeDefaultHeader |
RESTDataConnector.removeDefaultHeader( header ) |
Removes a default header value for a given name. |
setResponseHandler |
RESTDataConnector.setResponseHandler( function ) |
Override the default response hander for the RestDataConnector. |
setDefaultHeader |
RESTDataConnector.setDefaultHeader( header , value ) |
Set the default header value for a given name. |
RESTDataConnector
provides integration with a non-UI, external data service, for example a REST Service.A Data Connector is a Server Side JavaScript entity that provides the following functionality:
A new Data Connector is automatically added to the one of following namespaces:
The HTTP header Content-Type: application/json is set as default. This can be overridden by calling the com.ebasetech.xi.api.connectors.RESTDataConnector#setDefaultHeader(String, Object) function.
A Data Connector contains custom JavaScript functions used to call the remote service directly. These functions should be appropriately named to reflect the intention of the call, for example:
JavaScript example: Data Connector functions
The DataConnectors properties should be configured using the Verj.io Server Administration Console, for example an API key or application identifier. JavaScript example: Creating a new data connector. The DataConnectors is added to the Form and it can be accessed via a server side JavaScript event, for example a Button Control onClick event.JavaScript example: button click event
Further documentation