REST

Naming Convention

All REST universal modules should have the following module label and description:

  • Module label: Make an API Call

  • Module description: Performs an arbitrary authorized API call.

URL parameter

Expected input from users should start with / (for example /tasks) so users can copy-paste the endpoint path from the service documentation.

If the API has multiple versions of API available, the user should be allowed to use any of them. The URL set in the universal module should end before the version.

Set the correct URL in help and add a working endpoint example.

Communication

{
    "url": "https://www.example.com/{{parameters.url}}"
}

Mappable parameters

{
        "name": "url",
        "type": "text",
        "label": "URL",
        "help": "Enter a path relative to `https://www.example.com`. For example: `/v1/something`",
        "required": true
}

Even when the URL in Communication ends with / before {{parameters.url}}, we ask users to use / in the URL because it is automatically removed.

Rest universal module example

OAuth scopes

When your app requires specifying scopes to access different groups of endpoints, you need to change the connection code to ensure that it works correctly with the universal module:

1

Add a new advanced parameter called scopes to the connection parameters.

Advanced parameter scopes

2

In the authorize part of the connection, merge the original scopes with additional scopes added by the parameter from the previous step.

Scope parameter in authorization

Now a user can add additional scopes manually when creating a connection and these scopes will work with the universal module.

Example of a connection with additional scopes

Last updated