Allows you to send or retrieve data from an external service using HTTP. The external service can be secured or unsecured using Basic Authentication.
Configure External Data Sources
In order to use the Call REST API action, you must first configure External Data Sources in the administration panel:
Adding a new source:
1 Go to the External Data Sources tab.
2. Click RestApiEndpoint in the upper left corner of the screen
3. Complete the required field:
ID - the unique name of the data source
Enable button - check to activate the data source
URL - address of the API you want to call
HttpMethod - the HTTP method you want to use (GET, POST, PUT, DELETE)
CustomHeaders - custom HTTP headers (optional)
Authentication - authentication method
None: no authentication
Basic: specify user and password
Bearer token: configure the access token
Authentication configuration
Authentication (None) there is no authentication
Bearer Token: authentication through the obtained access token
TokenURL - the URL to obtain the token (e.g. url/api/token)
TokenField - location of the token in the API response (e.g. access_token)
BodyKeysValue - data needed to obtain the token (e.g. username, password, grant_type)
Action step
Where you can use action steps:
Workflow
Parameters:
Datasource name: (type: Text) - the identifier of the configured external data source
Query: (type: Text) - the URL you want to call
HTTP method: (type: Text)- GET, POST, PUT, DELETE
Content to send: (type: Text)-applies to POST AND PUT methods. Enter the data in JSON/XML format or provide the address of the sheet cell where the data is stored.
Content type: (type: Text)-type of data sent in the request application/json or application/xml
Response code cell adress: (type: Text) -address of the cell where the HTTP response code will be returned
Response cell adress: (type: Text) -address of the editable cell in which the response returned by the external data source will appear
Action step: call rest API - GET method
The result of downloaded data from the European central bank's api:
Action step: call rest API - POST method
The result of saving a record is a database
HTTP response code
The HTTP response code indicates the status of the request execution:
- 200 - success
- 400 - request error (e.g. missing required parameter)
- 500 - external server error
Remarks:
There may be multiple RestApiEndpoints defined on your site
0 Comments