Introduction
The REST call action allows you to send HTTP calls to a REST API during the execution of a process.
The response or the result of the REST call is stored in the processing context (SharedState) for further processing.
You can integrate any number of REST call actions into a process. You have the option of accessing the values returned in the response. This allows you to query the authentication data in a first REST call, for example, and then send the next query in the following REST call.
In addition to the option of accessing the processing context via REST call actions, the standard Groovy methods are also available for this purpose. Further information on this can be found under the following link Class SharedState.
Dialog-supported data entry - REST API client
In the REST call action, you can enter all the information required for the REST call with dialog support. You will be guided through a series of dialogs in which the required information is requested.
(The Apache HTTP Client 5 acts as a REST API client in the background)
Dynamic REST call actions - Resource mapping
"Resource mapping" is available within every REST call action. With its help, you can make REST call actions almost as dynamic or variable as you like. You can do this by inserting placeholders into the REST call action, which can be fed from various sources. When the REST call is executed, the placeholders are filled with the values determined at the time of execution. Values can be obtained from the following sources at the time the REST call is executed:
-
Static text
-
Request
-
Processing context (SharedState)
-
Data group
-
System data group(system data group)
-
User value
-
Previous request (previous REST call action)
-
Logon information memory(logon information memory)
-
Parameter memory(parameter memory)
Detailed information on this can be found in section Resource mapping.
Authentication options
The following authentication options are available in the REST call action:
-
Basic authentication
-
Authentication via API key
-
Authentication via bearer token
You can also create your own authentications.
If an API assigns session cookies, these can be stored and reused in later REST call actions of the same process.
In the following section, you will find an overview of the activities that you need to perform when entering a REST call action: