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
The Error Boundary for the HTTP Request (part of the REST API Connector) is not returning the actual HTTP errors, instead it sends a generic exception which is the same for all types of errors. Can this be corrected or is there another approach for receiving and handlinf the actual HTTP error responses inside the workflow?
Hello Adam Neuman, thanks for an interesting question.
The Error Boundary event is applicable to all the connectors (not only REST). Currently, it is a designed approach to send a generic exception. As a workaround, we recommend using the "if" condition (by adding the Exclusive gateway). Thus, error messages will be sent on the defined condition (in this case, if an in-app notification failed).
How can you use REST connector to do operations in Microsoft Active Directory connector? For example, if an external application would like to interface with DWP to call the REST API in order to add/remove a user/member from a Microsoft Active Directory Security Group, how this can be done? Could you please provide an example how to query membership of a Microsoft Active Directory Security Group using RES API end-point? Also, what kind of training is required to be able to perform Business-to-Business integration like REST APIs?
Hello, Pankaj Sud
Thank you for your queries and your interest in using REST APIs for B2B integrations. Please allow me some time to consult with the engineering team and we shall get back to you.
Thanks,
Aaditi
Hello Pankaj Sud ,
We do have a Microsoft Active Directory connector, which would make it easier to achieve the use case. Did you get a chance to look at the Microsoft Azure connector topic? As for the training for B2B integration using REST APIs, BMC does not recommend any specific training.
Hope this helps with your queries,
Aaditi
I have the same requirement ,need to add OU and have solution now ?
Hello Nick,
Thank you for your comment. Could you please elaborate on your requirement for us to respond to you effectively?
Aaditi
Hello, Nick Cui ,
It would be great if you can elaborate on your requirement for us. Meanwhile, I am closing this comment thread.
You can always reopen it when you are ready with the requirements.
Thanks,
Aaditi
I mean the AD connector can only create user ,create group now,but can not create Organizational unit . so is there a solution now ?
Hello Nick Cui ,
This would require a product enhancement. You can vote on, comment on, and submit product ideas in BMC Community. To see BMC Helix community ideas, click Digital Workplace community .
Thanks,
Aaditi
Is there any timeout for the Send Http Request node and can it be configured somewhere?
Hi Jan Hartung,
For versions of Digital Workplace prior to 21.02, you can set the timeout using the following environment variables:
These timeout values are in milliseconds.
For Digital Workplace 21.02 and later, there is unfortunately no way to specify a timeout.
If you need further help with this, you can submit a support ticket via this URL - https://www.bmc.com/support/support-central.html#/dashboard.
Thank you,
-John Taylor
Hi John,
Thanks for the explanation, that is what I was looking for.
Jan
Log in or register to comment.