You can expose functionality of your applications to third-party systems through REST APIs and REST API methods.

See how to expose data using REST.

Execution Lifecycle

REST APIs methods have the following the execution lifecycle:

Learn more about it in exposed REST API method lifecycle.

REST API Callbacks

To implement authentication use the OnAuthentication() callback:

  1. Select the exposed REST API;
  2. Go to property 'Authentication' and choose either 'Basic' or 'Custom';
  3. Implement the logic in the OnAuthentication() callback.

To run logic over requests or responses use the OnRequest() or OnResponse() callbacks:

  1. Select the exposed REST API;
  2. Go to properties, and choose the callback action in properties 'On Request' or 'On Response';
  3. Implement the logic in the OnRequest() or OnResponse() callback.

Once in use, callbacks are executed for all methods exposed by the REST API.

REST API Documentation

The Platform automatically generates documentation for users to learn how to use your exposed REST APIs.

Learn how document exposed REST APIs.

Properties

Property

Description

Optionality

Default value

Obs.

Name

Name that identifies the REST API in the module

Mandatory

 

 

Description

Text that describes the REST API

Optional

 

 

Icon

The icon that identifies the REST API and its methods in the module

Mandatory

Default Icon

 

URL

The relative URL where the service is available

N/A

/[module_name]/rest/[REST_API_name]

Read-only

Advanced Properties

Property

Description

Optionality

Default value

Obs.

HTTP Security

The HTTP security level required to access this REST API

Mandatory

SSL

To avoid vulnerabilities of the communication channel, we recommend to use SSL.

Authentication

The authentication mechanism required to call the methods of this REST API

Mandatory

None

Learn how to add basic authentication and custom authentication.

Internal Access Only

Indicates whether the access to this REST API is restricted by the Internal Network environment setting.

Mandatory

No

You can configure the Internal Network environment setting in the Configuration Tool.

Documentation

If set to 'Yes', a documentation page is automatically generated at the REST API base URL.

Mandatory

Yes

Learn how to document exposed REST APIs.

Send Default Values

Indicates whether attributes are sent in the response when they are not mandatory and have a default value set

Mandatory

No

To minimize the response payload, we recommend to set this property to No.

Events

Property

Description

Optionality

Default value

Obs.

OnRequest

This callback is executed after receiving a request to execute a method exposed by the REST API.

Use it, for example, to limit the number of requests made by clients.

Optional

 

Learn how to preprocess REST API requests.

OnResponse

This callback is executed before sending a response from a method exposed by the REST API.

Use it, for example, to convert responses from JSON to XML format.

Optional

 

Learn how to customize REST API responses.

 

See Also

Expose Data Using REST | Exposed REST API Method Properties