Use an external service to trigger workflows with the REST API calls by configuring HTTP
methods, endpoints, authentication, headers, and request bodies.
About this task
Note: To run workflows through API requests, you must use an external service that can send HTTP
requests. In the following example, Postman is used as an external client.
Procedure
- Open Postman and select the appropriate HTTP
method based on the workflow action.
- Access the API Details page and copy the API endpoint.
- Paste the API endpoint in the Request URL field in
Postman.
- Append the resource and method to the API endpoint.
- Click the Resources and Methods tab to view
available options. A list of resources and methods that are associated with the API
appears.
- Copy the resource and method.
- Paste the resource and method to the API endpoint in the Request
URL field in Postman.
- Next, configure the settings for API request in Postman. Click the
Authorization tab. Set the Authorization type to
API Key,
use X-INSTANCE-API-KEY as the Key name, and provide the Key
Value that is copied when the API key is created by using the SaaS Console.
Set the value in the Add to field as
Header.
- Add relevant headers associated with this API request.
- Click the Headers tab, and set Content-Type
to application/json.
- Add the rest of the headers as key-value pairs.
Note: Currently the REST API builder supports only the application/json
content type.
- Specify the data that you want to send in the Body of the API
request in the JSON format.
- Click the Body tab and select the raw format. In the example, the
name of the card to be created is sent in the API request body. Check that the payload keys that are
sent in the request body are the same as the webhook payload keys added earlier.
Note: HTTP methods - GET retrieves data and DELETE
removes the specified resource. Hence, the Body field for these methods must
remain blank. The HTTP method - POST , PUT, and
PATCH make certain modifications in the specified resource and must have
values in the Body field.
- Click Send to send an API request.
The workflow that
is associated with the API request is started and on a successful run, you can view the output of
the workflow in the Postman interface.
Note: Whenever a workflow is started from the REST API, the Path parameter
that is provided in the REST API URL is included to the body of the request, as there is no
Pathparameter option in workflow.