API Callouts allow ReadiNow workflows to call out to third-party web-based APIs in order to send or receive data. The third-party API must first be configured in the API administration section.
Once the API Callout record is set up, it can be readily reused in various workflows.
Designing the workflow
- Create a new Workflow
- Drop the API Callout activity onto the workflow design area
- The Exit path will be followed if the report server returned an HTTP status code of OK (200)
- The Failure path will be followed if the report server an HTTP status code indicating an error, if the service could not be reached, or if the API Call timed out
- Provide logic for each of the "Exit" and "Failure" paths
Configuring the API Callout activity
- Select the API Callout activity
- In the properties pane on the right-hand side, select the desired API Callout
- If the API Callout used any parameters in its Request URL, or its Request template, then those inputs will be shown
- For each of the API Callout inputs, enter a calculation or select an input
- Remember that the inputs are calculations, so you will need quote marks around any text
- These parameter values will be evaluated, and the system will use the templates to formulate a request
Using standard output parameters
The outputs of an API Callout activity can be used in the same manner as the outputs of other activities.
For API Callouts that also include a Response Template, the properties that appear in the response template can be accessed as part of the calculation via the
[API Callout.Response]
output or similar (e.g.[API Callout.Response].query.results.rate.Name + ' ' + [API Callout.Response].query.results.rate.rate
) wherequery.results.rate.Name
corresponds to a path of property values in the response template.The failure path may be used to inspect information about the actual request and response. For example,
[API Callout.HTTP Response Body]