REST API task

Use a REST API task to let a process in Orchestra call another system: to fetch data, send something on or start an action in that system. The process waits for the response and then continues.

Address and method

Under Connection (authentication), choose a connection from Hub. The connection provides the base address and the credentials, so no secrets are stored in your process. For an open API that needs no credentials, leave -- No connection -- selected.

Enter the address under Endpoint URL, and choose GET, POST, PUT, DELETE or PATCH under HTTP Method. You can use tags in the address.

The panel of a REST API task in a Duinzicht process: no connection selected, an example address under Endpoint URL and POST as the method.

Parameters, headers and body

Under Query string parameters (?name=value), add parameters to the address, each with a name and a value.

Under HTTP headers, click Header to add a header, such as Accept. Don't put credentials here: they come from the connection.

For POST, PUT and PATCH, fill in a Request body. Under Format for input body, choose JSON format, URL-encoded formdata or Raw data. GET and DELETE don't take a body: if there is one, the step stops with an error.

A query string parameter with the name bron and the value duinzicht.An HTTP header with the name Accept and the value application/json, with the Header button below it to add another one.

The response

Under Expected HTTP status code, enter which status codes count as a success. If you leave it empty, 200-299 applies. Under Timeout in seconds, enter how long the step waits for the response, up to 30 seconds.

To use part of the response, enter a JSONPath under Path to result, for example $.data. With Convert result to tags, you turn fields from the response into separate tags, such as $.data.id. You can use these tags in the next steps, for example in a gateway or an email.

When the call fails

If the system returns a different status code, or takes longer than the timeout, the step stops with an error message. The process instance stops at that step, and StatusQuo shows the message. By default, the step makes one attempt. To have it try again, set this up under Retry on error condition, with a condition, a number of attempts and a waiting time.

See also