API Node - Automate API Calls¶
API nodes let you connect to external systems and retrieve data by making SOAP or REST API calls. You can configure the APIs and pass the necessary parameters to fetch the required information.
Add and Configure an API Node¶
Setting up an API node in a tool flow involves adding the node at the appropriate location in the flow and configuring various node properties.
Steps to add and configure the node:
-
On the Tools tab, click the name of the tool to which you want to add the node. The Tool Flow page is displayed.
-
Click Go to flow to edit the in-development version of the flow.
-
In the flow builder, click the “+” icon on any existing node on the canvas and select API from the pop-up menu. (Alternatively, drag the API node from the Assets panel onto the canvas.)
-
Click the added node to open its properties dialog box. The General Settings for the node are displayed.
General Settings
Field | Description |
Node Name | Enter an appropriate name for the node. |
Type | Select the API type from the drop-down: REST or SOAP. |
Integration Type |
Select the integration type: Synchronous or Asynchronous. Synchronous: Waits for a response before proceeding.
|
Request Definition |
Define the service request details to make the call and fetch the data. Click Define Request and enter or select the following details in the Edit Request dialog box:
|
Connections
Click the Connections icon in the left navigation and select Go to Node for success and failure conditions.
- On Success > Go to Node: After the current node is successfully executed, go to a selected node in the flow to execute next. For example, you can process the data from this node into a Function node and then use it further. In this case, select the Function node.
-
On Failure > Go to Node: If the execution of the current node fails, go to an appropriate node having a custom error message configured.
-
Finally, test the flow and fix any issues found. Click the Run Flow button at the top-right corner of the flow builder and follow the onscreen instructions.
Note
Use the following syntax to access an API node using the context variable:
API Status Codes¶
- 200: Request successful
- 400: Client error, cannot process request
- 401: Authentication required
- 403: Access denied
- 404: Resource not found
- 500: Unexpected server error
- 504: Gateway timeout, no timely response from the upstream server