Limited support

 

This version of the product is in limited support. However, the documentation is available for your convenience. You will not be able to leave comments. Click here to view the documentation for the current version.

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:

ParameterExampleDescription
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 RequestSends an HTTP request to a RESTful web service.Send HTTP Request input parametersSend 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 parametersRender Template output parameters
Generate JWTGenerates 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 

RequiredParameter nameData typeExampleDescription
RequiredConnection IdStringConnection > Connection IDDefault Connection ID for this connector.
RequiredBody ParserString

Can be one of the following string constants:

  • auto
  • text
  • json
  • xml
A type of the body specified in the previous parameter.
OptionalSessionSessionAR-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 MethodString

Can be one of the following string constants:

  • GET
  • PUT
  • POST
  • DELETE
  • HEAD
  • OPTIONS
  • PATCH
HTTP method
Optional UriString

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.

OptionalHeadersInputSetBuild Input Set > Output > InputsA collection of HTTP headers of an HTTP request to be sent.
OptionalBodyString
A body of an HTTP request to be sent.

Send HTTP Request output parameters 

Parameter nameSub parameterData type
Request   BodyString
HeadersString
MethodString
URIString
Response   BodyString
HeadersString
StatusString
Status ReasonString
SessionCookiesString

Render Template input parameters 

RequiredParameter nameData typeExampleDescription
RequiredTemplateString

"{""First_Name"":""${First_Name}"",""Last_Name"":""${Last_Name}""}"

Template to process
Optional Template TypeString

Can be one of the following string constants:

  • URL
  • JSON
  • XML
  • TEXT
Type of the template arguments needed for selection of escaping rules.
 OptionalArgsInputSetBuild Input Set > Output > InputsA 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.

Render Template output parameters
Parameter nameData typeExampleDescription
OutputString 

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 

RequiredParameter nameData typeExampleDescription
RequiredJwt HeadersInputSet

Build Input Set > Output > Inputs that contain the following parameters:

alg is equal to one of the following values:

  • none
  • HS256
  • HS384
  • HS512
  • RS256
  • RS384
  • RS512
  • ES256
  • ES384
  • ES512
  • PS256
  • PS384
  • PS512

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.

OptionalIssuerString 

Identifies the principal that issued the JWT, a Client ID of a service.

Optional SubjectString Identifies the principal that is the subject of the JWT.
OptionalAudienceString Identifies the intended recipients of the JWT.
OptionalExpires inInteger The number of seconds in which the generated token will expire. The default is 60 seconds, unless a value greater than 0 is specified.
OptionalOther JwtBody ClaimsInputSetBuild Input Set > Output > InputsA set of non-standard JWT body claims.
OptionalPath to Signature KeyString 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 nameData typeExampleDescription
OutputStringBuild Input Set > OutputGenerates a JWT token that can be used as a parameter in other activities in a workflow.

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments

  1. Roland Brã¼gger

    Could you please add a real example concerning the relative URL: /method (Send HTTP Request input parameters.) Example: How ca we achieve this REST call using the relative syntax? https://arserver.abc.xyz.ch:8443/api/jwt/login Base URL: ? Uri: ? Thanks, Roland

    May 03, 2019 01:06
    1. Olga Kutetska

      Hello, Roland!

      Endpoint URI for the request can be either relative or absolute.

      A relative URI (jwt/login) is appended to the Base URL (https://arserver.abc.xyz.ch:8443/api) specified in the connection options.

      An absolute URI (https://arserver.abc.xyz.ch:8443/api/jwt/login) overrides the Base URL configuration setting.


      May 06, 2019 09:16
      1. Roland Brã¼gger

        Hi Olga, thanks for the quick clarification. I did it as you mentioned above - but it does not work… Refer to: https://communities.bmc.com/message/819951#819951 Roland

        May 06, 2019 09:38
        1. Olga Kutetska

          Hello, Ronald!

          I am afraid you need to contact support. Unfortunately, I cannot troubleshoot this problem. Have you tried everything that Tony Chung suggested?

          May 06, 2019 09:56