REST

Naming Convention

As we want to keep the naming of the Universal Modules the same across all Apps which support them, the Universal Module should keep the following guidelines.

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 the "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.

Example:

OAuth Scopes

When your app requires specifying scopes to access different groups of endpoints, you need to tweak the connection code a bit to make it work correctly with the Universal Module. Here's how:

Step 1

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

Step 2

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

Step 3

Now when you want to use Universal Module with scopes that have not been granted to the connection previously, you can create a new connection and request those additional scopes manually.

Last updated