Execute a REST API call to an external source. The REST API Call workflow task is located in the Application section of the Workflow toolbox.
Create a connection string
Create a connection string to the destination endpoint to use the Rest API call workflow object. To do this:
- Open the Configure menu and navigate to the Connection Strings section.
- Select + to create a new connection string.
- Select Rest API from the dropdown in Provider.
Connection String: The connection string is in a JSON format with two primary components, the base URL and a Header.
The base URL is the URL to the destination, and the Header is used to define the authorization.
Sample connection string using an apikey for authentication:
{
Url:"http://my_sample_url.com ",
Headers:
{
apikey: "7abEtJvCPcrR7MP"
}
}
Sample connection string using basic authentication:
{URL:"http://my_sample_url.com ",
Headers:
{Authorization: "Basic bXlzYW1wbGV1aWQ6YW5kcGFzc3dvcmQ="
}
}
Build the workflow
- Create a new process in Explorer.
- Drag the Rest API Call object onto the canvas; it can be found in the workflow toolbox under the Application menu toolbox under the Application menu.
- Highlight the Rest API call object and select the pencil icon to edit the properties.
- Select the connection string created earlier in the Properties dialog box..
The Rest API call workflow object supports these verbs:- Get
- Put
- Post
- Delete
- The path determines the resource you are requesting. For example, if you use the Alteryx REST API
(https://YourAlteryxSite/api/v1), you can use the path to tell the workflow job to run. A path of /v1/workflows/{appId}/jobs/ triggers the execution of an Alteryx job outside Anaplan.