API Callout in a Workflow

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

  1. Create a new Workflow
  2. Drop the API Callout activity onto the workflow design area
  3. The Exit path will be followed if the report server returned an HTTP status code of OK (200)
  4. 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
  5. Provide logic for each of the "Exit" and "Failure" paths

Configuring the API Callout activity

  1. Select the API Callout activity
  2. In the properties pane on the right-hand side, select the desired API Callout
  3. If the API Callout used any parameters in its Request URL, or its Request template, then those inputs will be shown
  4. For each of the API Callout inputs, enter a calculation or select an input
  5. Remember that the inputs are calculations, so you will need quote marks around any text
  6. 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) where query.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]