Request ID Configuration
Configuration reference for the Request ID plugin (`request-id`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.
Parameters
See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.
header_name — string · optional · default: X-Request-Id · since APISIX 2.0 · API7 Gateway 3.2.16.7
Specify the name of the header that carries the request unique ID. Note that if a request carries an ID in the header_name header, the plugin will use the header value as the unique ID and will not overwrite it with the generated ID.
include_in_response — boolean · optional · default: true · since APISIX 2.0 · API7 Gateway 3.2.16.7
If true, include the generated request ID in the response header, where the name of the header is the header_name value.
algorithm — string · optional · default: uuid · since APISIX 2.9 · API7 Gateway 3.2.16.7
Valid values: uuid, nanoid, range_id, ksuid, or uuidv7
Specify the algorithm used for generating the unique ID.
When set to uuid, the plugin generates a universally unique identifier. When set to nanoid, the plugin generates a compact, URL-safe ID. When set to range_id, the plugin generates a sequential ID with specific parameters. When set to ksuid, the plugin generates a time-sortable, globally unique ID. KSUID support was introduced in API7 Enterprise 3.9.0 and APISIX 3.14.0. When set to uuidv7, the plugin generates an RFC 9562 UUID v7 identifier with a millisecond timestamp, a worker-local sequence, and random bits. UUID v7 values are monotonic within one worker, but ordering is not coordinated across workers or gateway instances. UUID v7 support was introduced in API7 Enterprise 3.9.8 and APISIX 3.17.0.
range_id — object · optional · since APISIX 3.2.0 · API7 Gateway 3.2.16.7
Define the configuration for generating a request ID using the range_id algorithm.
char_set — string · optional · default: abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ0123456789 · since APISIX 3.2.0 · API7 Gateway 3.2.16.7
Valid values: minimum length 6
Specify the character set used for the range_id algorithm.
length — integer · optional · default: 16 · since APISIX 3.2.0 · API7 Gateway 3.2.16.7
Valid values: greater than or equal to 6
Set the length of the generated ID for the range_id algorithm.