Using local environment variables with REST nodes
The REST request nodes support a number of local environment message tree variables, which you can use to dynamically alter the values that are set in the node properties.
The following table shows elements in the LocalEnvironment.Destination.REST.Request message tree, which can be used to override properties in the RESTRequest and RESTAsyncRequest nodes. Any properties that are set by the local environment variables will apply to both the RESTRequest and RESTAsyncRequest nodes.
Element name | Type | Description |
---|---|---|
Operation | string | The value is the name of the operation to invoke
in the REST API. This environment variable overrides the Operation property
on the node. For example:
|
Parameters.parameter_name | string | Specify values to use for the parameters of
the operation. The values specified in the LocalEnvironment override
any literal values or XPath/ESQL expressions specified in the Parameters table
on the node. For example:
Note: If
the values are XPath/ESQL expressions, the values are passed to the
remote REST API as string literals (and not evaluated as XPath/ESQL
expressions).
To define the REST parameters and set their
values in a message map, use the Add User Defined function
to add the |
ContentType | string | The value is the value of the Content-Type header
to send in the request to the REST API. This environment variable
overrides the Content-Type property on the node.
For example:
|
Accept | string | The value is the value of the Accept header
to send in the request to the REST API. This environment variable
overrides the Accept property on the node. For
example:
|
SecurityIdentity | string | The value must be the name of a security identity
defined with the mqsisetdbparms command.
Do not include the "rest::" prefix. This environment variable overrides
the Security identity property on the node. For
example:
|
UserID | string | If this environment variable is specified, it
overrides all the values that are specified by the LocalEnvironment.Destination.REST.Request.SecurityIdentity override
and the Security identity property on the node. If
the |
Password | string | If this environment variable is specified, it
overrides all the values that are specified by the LocalEnvironment.Destination.REST.Request.SecurityIdentity override
and the Security identity property on the node. If
the |
APIKey | string | If this environment variable is specified, it
overrides all the values that are specified by the LocalEnvironment.Destination.REST.Request.SecurityIdentity override
and the Security identity property on the node. The |
Timeout | integer | The time (in seconds) that the node waits for
the REST API to process the operation. This environment variable overrides
the Request timeout (sec) property on the node.
For example:
|
BaseURL | string | This environment variable overrides the Base
URL override property on the node, and the base URL specified
in the Swagger document containing the definitions of the REST API.
For example:
|
ProxyURL | string | This environment variable overrides the HTTP(S)
proxy location property on the node. For example:
|
FollowRedirection | boolean | This environment variable overrides the Follow
HTTP(S) redirection property on the node. For example:
|
KeepAlive | boolean | This environment variable overrides the Enable
HTTP 1/1 keep-alive property on the node. For example:
|
Compression | string | This environment variable overrides the Compression property
on the node. Valid values are:
|
Protocol | string | This environment variable overrides the Protocol property
on the node. Valid values are:
|
AllowedCiphers | string | This environment variable overrides the Allowed
SSL Ciphers property on the node. For example:
|
HostnameChecking | boolean | This environment variable overrides the Enable
SSL certificate hostname checking property on the node.
For example:
|
KeyAlias | string | This environment variable overrides the SSL
client authentication key alias property on the node. For
example:
|
EnableCRLCheck | boolean | This environment variable overrides the Enable
certificate revocation list checking property on the node.
For example:
|
AcceptCompressedResponses | string | This environment variable overrides the Accept
compressed responses by default property on the node. For
example:
|
ServicePrincipalName | string | Specifies the Service Principal Name (SPN) to
use when the integration node negotiates the Kerberos security protocol.
For example:
|
SecuritySchemes.security_scheme.SecurityIdentity | string | Specifies the name of a security identity to
use for the specified security scheme. The specified security identity
is used only for the specified security scheme. If this environment
variable is specified, it overrides the The name of the security scheme corresponds to the name of a Security Scheme Object in a Security Definitions Object in the Swagger document containing the definitions of the REST API. The value must be the name of a security identity defined with the mqsisetdbparms command. Do not include the "rest::" prefix. For example:
|
SecuritySchemes.security_scheme.UserID | string | Specify the user ID to use for the specified
security scheme when using HTTP Basic Authentication. The specified
user ID is used only for the specified security scheme. If this
environment variable is specified, it overrides the user ID specified
in a security identity using either the The name of the security scheme corresponds to the name
of a Security Scheme Object in a Security Definitions Object in the
Swagger document containing the definitions of the REST API. For
example:
|
SecuritySchemes.security_scheme.Password | string | Specify the password to use for the specified
security scheme when using HTTP Basic Authentication. The specified
password is used only for the specified security scheme. If this
environment variable is specified, it overrides the password specified
in a security identity using either the The name of the security scheme corresponds to the name of a Security Scheme Object in a Security
Definitions Object in the Swagger document containing the definitions of the REST API. For
example:
|
SecuritySchemes.security_scheme.APIKey | string | Specify the API key to use for the specified
security scheme when using HTTP Basic Authentication. The specified
API key is used only for the specified security scheme. If this
environment variable is specified, it overrides the API key specified
in a security identity using either the The name of the security scheme corresponds to the name
of a Security Scheme Object in a Security Definitions Object in the
Swagger document containing the definitions of the REST API. For example:
|
UserContext | mixed content | Specify context data to be stored by the RESTAsyncRequest node. The
data can later be accessed by the RESTAsyncResponse node for
the matching request. You can use the user context to specify data
that will be passed from the RESTAsyncRequest node to the RESTAsyncResponse node. To
store user context data, prior to the RESTAsyncRequest node, either
set a value in the For example,
to set the values by using an ESQL expression:
You
can use a Mapping node
to set a value, by mapping to the mixed child element To
access the user context data after a RESTAsyncResponse node, read
the value or children of the |
QueryStringDoNotPercentEncodeCharacters | String | Specifies those characters in the query string that are not to be
percent encoded while the URI is built. For example, to specify that the comma and greater than
symbols are not to be percent
encoded:
The
default set of characters not to be percent encoded is asterisk ( |
Element | Type | Description |
---|---|---|
LocalEnvironment.WrittenDestination.REST.Method | string | The HTTP method used when invoking the operation in the REST API. |
LocalEnvironment.WrittenDestination.REST.URL | string | The URL used when invoking the operation in the REST API. |
LocalEnvironment.WrittenDestination.REST.RequestHeadersSize | integer | The size of the request headers sent to the REST API. |
LocalEnvironment.WrittenDestination.REST.RequestBodySize | integer | The size of the request body sent to the REST API. |
LocalEnvironment.WrittenDestination.REST.StatusCode | integer | The HTTP status code in the response from the REST API. |
LocalEnvironment.WrittenDestination.REST.ResponseHeadersSize | integer | The size of the response headers received from the REST API. |
LocalEnvironment.WrittenDestination.REST.ResponseBodySize | integer | The size of the response body received from the REST API. |
LocalEnvironment.WrittenDestination.REST.TotalRequestTime | integer | The total elapsed time invoking the operation in the REST API. |
Element | Type | Description |
---|---|---|
LocalEnvironment.WrittenDestination.REST.Method | string | The HTTP method used when invoking the operation in the REST API. |
LocalEnvironment.WrittenDestination.REST.URL | string | The URL used when invoking the operation in the REST API. |
LocalEnvironment.WrittenDestination.REST.RequestHeadersSize | integer | The size of the request headers sent to the REST API. |
LocalEnvironment.WrittenDestination.REST.RequestBodySize | integer | The size of the request body sent to the REST API. |
LocalEnvironment.WrittenDestination.REST.CorrelationID | blob | The correlation ID used to correlate the request and response between the RESTAsyncRequest and RESTAsyncResponse nodes. |
Element | Type | Description |
---|---|---|
LocalEnvironment.REST.Response.CorrelationID | blob | The correlation ID used to correlate the request and response between the RESTAsyncRequest and RESTAsyncResponse nodes. |
LocalEnvironment.REST.Response.StatusCode | integer | The HTTP status code in the response from the REST API. |
LocalEnvironment.REST.Response.ResponseHeadersSize | integer | The size of the response headers received from the REST API. |
LocalEnvironment.REST.Response.ResponseBodySize | integer | The size of the response body received from the REST API. |
LocalEnvironment.REST.Response.UserContext | mixed content | The information that was stored in the OutputLocalEnvironment.Destination.REST.Request.UserContext can be retrieved by the response thread. |