Skip to main content

Parameters

See plugin common configurations for configuration options available to all plugins.

  • header_name

    string

    default: X-Request-Id


    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

    default: true


    If true, include the generated request ID in the response header, where the name of the header is the header_name value.

  • algorithm

    string

    default: uuid

    vaild vaule:

    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. The ksuid option is available in APISIX from version 3.14.0 and API7 Enterprise from version 3.9.0. When set to uuidv7, the plugin generates a UUID v7 identifier (RFC 9562) that embeds a millisecond-precision timestamp followed by random bits, making IDs time-ordered and lexicographically sortable. Available in API7 Enterprise from version 3.9.8 and APISIX from version 3.17.0.

  • range_id

    object


    Define the configuration for generating a request ID using the range_id algorithm.

    • char_set

      string

      default: abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ0123456789

      vaild vaule:

      minimum length 6


      Specify the character set used for the range_id algorithm.

    • length

      integer

      default: 16

      vaild vaule:

      greater than or equal to 6


      Set the length of the generated ID for the range_id algorithm.