REST connector
The REST connector enables you to add calls to RESTful web services inside a process workflow. You can then process the response through a parameterized template, which can be used as the body of an HTTP request in later steps in a workflow.
Configuration parameters
You can configure the default settings for the REST connector as described in Configuring service connectors. The following table describes the parameter required to create a connection:
Parameter | Example | Description |
---|---|---|
Default Base URL | http://server1-example.com | The base URL to enable workflow actions to use relative URLs. A base URL enables the workflow action to target the endpoint by relative URL: /method. The workflow action can override the base URL by specifying the full URL to an endpoint: http://server2-example.com/method |
Workflow actions available through the REST connector
The following table provides an overview of all REST connector actions:
Action | Description | Input parameters | Output parameters |
---|---|---|---|
Send HTTP Request | Sends an HTTP request to a RESTful web service. | Send HTTP Request input parameters | Send HTTP Request output parameters |
Render Template | Processes parameterized template, inserts passed arguments into the template’s parameters, and returns the rendered template as a string. Template argument values are processed before they are inserted into the template so that special characters are escaped by the rules specified in the Template Type parameter. | Render Template input parameters | Render Template output parameters |
Generate JWT | Generates a signed or unsigned JSON web token. | Generate JWT input parameters | Generate JWT output parameters |
Input and output parameters for actions
Send HTTP Request input parameters
Required | Parameter name | Data type | Example | Description |
---|---|---|---|---|
Required | Connection Id | String | Connection > Connection ID | Default Connection ID for this connector. |
Required | Body Parser | String | Can be one of the following string constants:
| A type of the body specified in the previous parameter. |
Optional | Session | Session | AR-JWT=eyJhbGciOiJIUzI1NiJ9... | If the session value is not specified, a new session value is created by default. Authentication session data can be used across several HTTP requests. The Session value output from one Send HTTP Request action can be passed to the Session value input of another action. The session is valid for the duration allowed by the policy of the connected service. |
Optional | Method | String | Can be one of the following string constants:
| HTTP method |
Optional | Uri | String | http://server2-example.com/method /method | Endpoint URI for the request. Can be relative or absolute. A relative URI is appended to the Base URL specified in the connection options. An absolute URI overrides the Base URL configuration setting. |
Optional | Headers | InputSet | Build Input Set > Output > Inputs | A collection of HTTP headers of an HTTP request to be sent. |
Optional | Body | String | A body of an HTTP request to be sent. |
Send HTTP Request output parameters
Parameter name | Sub parameter | Data type |
---|---|---|
Request | Body | String |
Headers | String | |
Method | String | |
URI | String | |
Response | Body | String |
Headers | String | |
Status | String | |
Status Reason | String | |
Session | Cookies | String |
Render Template input parameters
Required | Parameter name | Data type | Example | Description |
---|---|---|---|---|
Required | Template | String | "{""First_Name"":""${First_Name}"",""Last_Name"":""${Last_Name}""}" | Template to process |
Optional | Template Type | String | Can be one of the following string constants:
| Type of the template arguments needed for selection of escaping rules. |
Optional | Args | InputSet | Build Input Set > Output > Inputs | A set of arguments to be passed to the template. |
Tip
Import the ServiceExport.zip as a service for an example with the Render Template input parameters.
Parameter name | Data type | Example | Description |
---|---|---|---|
Output | String | A string that contains a template with arguments substituted with their values. Special characters are escaped according to the format selected in the Template Type input parameter. |
Generate JWT input parameters
Required | Parameter name | Data type | Example | Description |
---|---|---|---|---|
Required | Jwt Headers | InputSet | Build Input Set > Output > Inputs that contain the following parameters: alg is equal to one of the following values:
typ=JWT Other JWT headers also possible. | A set of JWT headers to be added to the token. If alg is not specified, JWT is unsigned. If typ is not specified, JWP is specified by default. |
Optional | Issuer | String | Identifies the principal that issued the JWT, a Client ID of a service. | |
Optional | Subject | String | Identifies the principal that is the subject of the JWT. | |
Optional | Audience | String | Identifies the intended recipients of the JWT. | |
Optional | Expires in | Integer | The number of seconds in which the generated token will expire. The default is 60 seconds, unless a value greater than 0 is specified. | |
Optional | Other JwtBody Claims | InputSet | Build Input Set > Output > Inputs | A set of non-standard JWT body claims. |
Optional | Path to Signature Key | String | A fully qualified path to a private key that is to be used to sign the generated JWT. Required only if the token must be signed. |
Generate JWT output parameters
Parameter name | Data type | Example | Description |
---|---|---|---|
Output | String | Build Input Set > Output | Generates a JWT token that can be used as a parameter in other activities in a workflow. |
Comments
Log in or register to comment.