context object for the API gateway
The context object can access and manipulate variables in
the API context, the HTTP message payload, and the HTTP message header during the processing of the
assembly rule in the API gateway.
For the context object of all
traditional DataPower® services, see context object for traditional DataPower services.
The context object is used for the assembly processing by API gateway services.
To create a message object that represents a request or response, use the context.createMessage() API.
To retrieve the value of a specific message object, use the context.getMessage() API.
The context object for the API gateway supports the following APIs.
- APIs to access and manipulate variables in the API context.
- APIs to read the original payload and return the content in a specific format.
- APIs to retrieve values of the original header of a request.
- APIs to manipulate properties of the current message.
- API to raise a custom error and stop the processing of the current assembly rule.
- API to read the OpenAPI document in the configuration of the API definition.
The message object for the API gateway supports the following APIs.
- APIs to read the current payload and return the content in a specific format.
- API to write content to the current payload.
- APIs to access and manipulate the current header of the message.
- APIs to retrieve the status code and reason phrase of a message.