API context variables
Variables in the API context that represent the attributes of the called API.
| Name | Description | Permission |
|---|---|---|
api.catalog.id |
The unique identifier of the catalog that the API belongs to. | Read/write |
api.catalog.name |
The name of the catalog that the API belongs to. | Read/write |
api.catalog.path |
The path of the catalog that the API belongs to. | Read/write |
api.compatibility.enforce-required-params |
Indicates whether a required parameter check is done for the API request. | Read/write |
api.compatibility.security.copy-id-headers-to-message |
Indicates whether security headers are copied to the target service. | Read/write |
api.compatibility.security.return-v5-responses |
Indicates whether v5-compatible responses to OAuth and client security error conditions are returned. | Read-only |
api.compatibility.wrapper-policies.allow-chunked-uploads |
Indicates whether documents are sent to the server with
Transfer-Encoding: chunked. |
Read/write |
api.endpoint.address |
The address of the gateway endpoint. | Read/write |
api.endpoint.hostname |
The hostname of the gateway endpoint, as requested by the client application. | Read/write |
api.id |
The identifier of the API. | Read/write |
api.name |
The name of the API definition. | Read/write |
api.operation.id |
The ID of the operation. | Read/write |
api.operation.path |
The path of the operation. | Read/write |
api.org.id |
The organization ID of the API provider. | Read/write |
api.org.name |
The organization short name of the API provider. | Read/write |
api.properties.propertyname |
The name of a custom API property. For more information, see Creating API definitions. | Read/write |
api.root |
The API base path. | Read/write |
api.security.bearer_token |
The value of the bearer token. | Read/write |
api.security.bearer_validation_response |
The JSON response body from the validation endpoint. | Read/write |
api.version |
The version of the API. | Read/write |
api.type |
The API type, which is REST. |
Read/write |
client.app.id |
The client ID or application key that is received on the request. | Read/write |
client.app.name |
The name of the client application that issued the request. | Read/write |
client.app.metadata.key |
The metadata for each key that is assigned to the client application. | Read/write |
client.app.secret |
The client secret that is received in the request. | Read/write |
client.app.lifecycle-state |
The lifecycle state of the client application, which is
development or production. |
Read/write |
client.app.type |
Value is always an empty string, which is a NULL value. | Read/write |
client.org.id |
The unique identification key of the organization that owns the client application. | Read/write |
client.org.name |
The name of the organization that owns the client application. | Read/write |
client.result |
The result of the client security assembly action, which is
SUCCESS or FAILURE. |
Read/write |
client.third_party.headers |
The array of headers added to the request that was sent to that API authentication URL during third-party authentication. | Read/write |
client.third_party.response.authenticated |
The third-party authentication results.
|
Read/write |
client.third_party.response.user |
The user for third-party authentication. | Read/write |
client.third_party.type |
The user-registry type used for third-party authentication of the extracted
client credentials.
|
Read/write |
client.title |
The title of the credentials that is received in the request. | Read/write |
env.path |
The path segment that represents this collection. | Read/write |
error.message |
The message text for the error. | Read/write |
error.name |
The name of the error. | Read-only |
log |
The transaction data gathered in a log assembly action. | Read/write |
message.attachments |
The array of attachments in a multipart message. | Read/write |
message.attachments[].body |
The attachment payloads in a multipart message. | Read/write |
message.attachments[].headers |
The attachment headers in a multipart message. | Read/write |
message.body |
The current payload of the message. | Read/write |
message.headers.name |
The value of the current named header of the message or of the current named header of the root part of a multipart message. The name segment is case-insensitive. | Read/write |
message.original.headers.name |
The value of the original named header of the HTTP message. When the assembly contains an invoke assembly action, the value is automatically populated by the original named header of the response message from the called URL. The name segment is case-insensitive. | Read-only |
message.package.headers.name |
The value of the current named header of the multipart message. The name segment is case-insensitive. | Read/write |
message.status.code |
The HTTP status code of the response, which is a value in range 100 - 999. | Read/write |
message.status.reason |
The HTTP reason phrase of the response. | Read/write |
message.variables.name |
The value of a property in the message. For example, when foo
is the property in the message, you can retrieve the value of the foo property by
reading message.variables.foo. |
Read/write |
plan.id |
The unique identifier of the plan. | Read/write |
plan.name |
The name of the plan. | Read/write |
plan.rate-limit |
The rate limit of the plan, which is the number of API calls per time interval. | Read/write |
plan.rate-limit[index].hard-limit |
The hard limit setting for the rate limit scheme that is identified by
[index]. |
Read/write |
plan.rate-limit[index].value |
The value of the rate limit scheme that is identified by
[index]. The syntax is
rate/interval. |
Read/write |
plan.spaceId |
The unique identifier of the space that the plan is contained within. | Read/write |
plan.spaceName |
The name of the space that the plan is contained within. | Read/write |
plan.version |
The version number of the plan. | Read/write |
request.authorization |
The parsed HTTP authorization header. |
Read-only |
request.body |
The original payload of the incoming request. | Read-only |
request.content-type |
The normalized content-type value. | Read-only |
request.date |
The date object that represents approximately when the API gateway received the request. | Read-only |
request.headers.name |
The value of the current named header of the HTTP request, or the value of the current named header of the root part of a multipart request. The name segment is case-insensitive. The request header can be modified only in preflow actions. For more information, see Request processing. | Read/write |
request.original.headers.name |
The value of the original named header of the HTTP request. This variable is created only when the request header is modified. The name segment is case-insensitive. | Read-only |
request.original.parameters.name.values |
An array that contains the original values of the parameter types that are associated with the parameter that is specified in name. This variable is created only when a request parameter value is modified. | Read-only |
request.package.headers.name |
The value of the named header of the multipart request. The name segment is case-insensitive. | Read-only |
request.parameters.name.locations |
An array of strings that specify the parameter types that are associated with
the parameter that is specified in name. The supported keywords for parameter
types are as follows.
|
Read-only |
request.parameters.name.values |
An array that contains values of the parameter types that are associated with
the parameter that is specified in name. For example, when the first value is
path in request.parameters.foo.locations[], the first value in
request.parameters.foo.values[] is the array of path values that are associated
with foo. Request parameters can be modified only in preflow actions. For more
information, see Request processing. |
Read/write |
request.path |
The path section of the request.uri that starts with the base
path of the API, including the / character that begins the base path. |
Read-only |
request.protocol |
The protocol that is used to receive the request, which is
http or https. |
Read-only |
request.querystring |
The request query string without the leading ?
character. |
Read-only |
request.search |
The request query string with the leading ?
character. |
Read-only |
request.uri |
The full request URI that is received from the client application. | Read-only |
request.verb |
The HTTP verb of the request. | Read-only |
session.apiGateway |
The gateway that receives the request. | Read-only |
session.apiGatewayName |
The name of the API gateway as defined in the API Manager in API Connect. | Read-only |
session.clientAddress |
The address of the client that sent the request. | Read-only |
session.domainName |
The name of the domain that the gateway belongs to. | Read-only |
session.globalTransactionID |
The global transaction ID in the logs. | Read-only |
session.localAddress |
The local address of the gateway. | Read-only |
session.timeStarted |
The time that the gateway started to process the request. | Read-only |
session.transactionID |
The transaction ID of the gateway request. | Read-only |
system.date |
The current date in the system time zone in a JSON object. | Read-only |
system.date.day-of-month |
The day of the month in the system time zone, which is a value in the range 1 - 31. | Read-only |
system.date.day-of-week |
The day of the week in the system time zone, which is a value in the range 1 - 7 (Monday to Sunday). | Read-only |
system.date.month |
The month in the system time zone, which is a value in the range 1 - 12 (January to December). | Read-only |
system.date.year |
The year in the system time zone, which is a value is a four-digit number. | Read-only |
system.datetime |
The current date and time in the system time zone in a JSON object. | Read-only |
system.time |
The current time in the system time zone in a JSON object. | Read-only |
system.time.hour |
The hour of the current time in the system time zone, which is a value in the range 0 - 23. | Read-only |
system.time.minute |
The minute of the current time in the system time zone, which is a value in the range 0 - 59. | Read-only |
system.time.seconds |
The second of the current time in the system time zone, which is a value in the range 0 - 59. | Read-only |
system.timezone |
The ISO 8601 identifier for the system time zone. | Read-only |