API-scoped modifications of requests and responses.
path.params.*
— placeholder values specified in the endpoint URL.
/resource/{resourceId}
and the HTTP request URL is /resource/801d49c2-ca05-42b1-97af-baf0ddf36ba3
,then there will be a variable path.params.resourceId
with value "801d49c2-ca05-42b1-97af-baf0ddf36ba3"
.request.remote_addr
— Client IP address.
request.headers['header-name']
— Request header values.
request.query['query_string_parameter_name']
— Request query string parameters.
request.body
— Request body.
response.statusCode
— HTTP status code of the response from the upstream.
response.headers['header-name']
— Response header values.
response.body
— Raw response body.
jq is like sed for JSON data - you can use it to slice and filter and map and transform JSON with the same ease that sed, awk, grep and friends let you play with text.Unlike JavaScript expressions, the result of jq transformation does not necessarily have to be a string. If the expression result is not a string, it’s encoded as JSON.
.
) to your jq expressions:
Input for request transformation expressions
Input for response transformation expressions