Related Documentation
Made by
Kong Inc.
Supported Gateway Topologies
hybrid db-less traditional
Supported Konnect Deployments
hybrid cloud-gateways serverless
Compatible Protocols
grpc grpcs http https
Minimum Version
Kong Gateway - 2.6

The jq plugin enables arbitrary jq transformations on JSON objects included in API requests or responses.

The configuration accepts two sets of options: one for the request and another for the response. For both the request and response, a jq program string can be included, along with some jq option flags and a list of media types.

One of the configured media types must be included in the Content-Type header of the request or response for the jq program to run. The default media type in the Content-Type header is application/json.

In the response context, you can also specify a list of status codes, one of which must match the response status code. The default response status code is 200.

Note: In the response context, the entire body must be buffered to be processed. This requirement also implies that the Content-Length header will be dropped if present, and the body transferred with chunked encoding.

See jq’s documentation on Basic filters for more information on writing programs with jq.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!