Plugin

object

A Plugin entity represents a plugin configuration that will be executed during the HTTP request/response lifecycle. It is how you can add functionalities to Services that run behind Kong, like Authentication or Rate Limiting for example. You can find more information about how to install and what values each plugin takes by visiting the Kong Hub. When adding a Plugin Configuration to a Service, every request made by a client to that Service will run said Plugin. If a Plugin needs to be tuned to different values for some specific Consumers, you can do so by creating a separate plugin instance that specifies both the Service and the Consumer, through the service and consumer fields.

* Additional properties are NOT allowed.
__ui_dataobject

Arbitrary JSON data for UI configuration. Konnect only field, not synced to the Gateway.

* Additional properties are allowed.
conditionstring

An expression used for conditional control over plugin execution. If the expression evaluates to true during the request flow, the plugin is executed; otherwise, it is skipped.

<= 1024 characters

configobject

The configuration properties for the Plugin which can be found on the plugins documentation page in the Kong Hub.

* Additional properties are allowed.
consumerobject

If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.

Show Child Parameters
consumer_groupobject

If set, the plugin will activate only for requests where the specified group has been authenticated

Show Child Parameters
created_atinteger

Unix epoch when the resource was created.

descriptionstring

User-defined entity description. Konnect only field, not synced to the Gateway.

enabledboolean

Whether the plugin is applied.

Default:true

idstring

A string representing a UUID (universally unique identifier).

>= 1 characters

instance_namestring

A unique string representing a UTF-8 encoded name.

managed_byobject

Arbitrary JSON data for client responsible for managing the entity. Konnect only field, not synced to the Gateway.

* Additional properties are allowed.
namestringrequired

The name of the Plugin that’s going to be added. Currently, the Plugin must be installed in every Kong instance separately.

>= 1 characters

orderingobject
Show Child Parameters
partialsarray[object]

A list of partials to be used by the plugin.

Show Child Parameters
protocolsarray[string]

A string representing a protocol, such as HTTP or HTTPS.

Allowed values:grpcgrpcshttphttpstcptlstls_passthroughudpwswss

Default:grpc, grpcs, http, https

routeobject

If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the Route being used.

Show Child Parameters
serviceobject

If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.

Show Child Parameters
tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example

Error

object

standard error

statusintegerrequiredread-only

The HTTP status code of the error. Useful when passing the response
body to child properties in a frontend UI. Must be returned as an integer.

titlestringrequiredread-only

A short, human-readable summary of the problem. It should not
change between occurences of a problem, except for localization.
Should be provided as “Sentence case” for direct use in the UI.

typestringread-only

The error type.

instancestringrequiredread-only

Used to return the correlation ID back to the user, in the format
kong:trace:<correlation_id>. This helps us find the relevant logs
when a customer reports an issue.

detailstringrequiredread-only

A human readable explanation specific to this occurence of the problem.
This field may contain request/entity data to help the user understand
what went wrong. Enclose variable values in square brackets. Should be
provided as “Sentence case” for direct use in the UI.

Example

UnauthorizedError

statusintegerrequiredread-only

The HTTP status code of the error. Useful when passing the response
body to child properties in a frontend UI. Must be returned as an integer.

Example:401

titlestringrequiredread-only

A short, human-readable summary of the problem. It should not
change between occurences of a problem, except for localization.
Should be provided as “Sentence case” for direct use in the UI.

Example:Unauthorized

typestringread-only

The error type.

Example:https://httpstatuses.com/401

instancestringrequiredread-only

Used to return the correlation ID back to the user, in the format
kong:trace:<correlation_id>. This helps us find the relevant logs
when a customer reports an issue.

Example:kong:trace:1234567890

detailstringrequiredread-only

A human readable explanation specific to this occurence of the problem.
This field may contain request/entity data to help the user understand
what went wrong. Enclose variable values in square brackets. Should be
provided as “Sentence case” for direct use in the UI.

Example:Invalid credentials

Example

ForbiddenError

statusintegerrequiredread-only

The HTTP status code of the error. Useful when passing the response
body to child properties in a frontend UI. Must be returned as an integer.

Example:403

titlestringrequiredread-only

A short, human-readable summary of the problem. It should not
change between occurences of a problem, except for localization.
Should be provided as “Sentence case” for direct use in the UI.

Example:Forbidden

typestringread-only

The error type.

Example:https://httpstatuses.com/403

instancestringrequiredread-only

Used to return the correlation ID back to the user, in the format
kong:trace:<correlation_id>. This helps us find the relevant logs
when a customer reports an issue.

Example:kong:trace:1234567890

detailstringrequiredread-only

A human readable explanation specific to this occurence of the problem.
This field may contain request/entity data to help the user understand
what went wrong. Enclose variable values in square brackets. Should be
provided as “Sentence case” for direct use in the UI.

Example:Forbidden

Example

NotFoundError

statusintegerrequiredread-only

The HTTP status code of the error. Useful when passing the response
body to child properties in a frontend UI. Must be returned as an integer.

Example:404

titlestringrequiredread-only

A short, human-readable summary of the problem. It should not
change between occurences of a problem, except for localization.
Should be provided as “Sentence case” for direct use in the UI.

Example:Not Found

typestringread-only

The error type.

Example:https://httpstatuses.com/404

instancestringrequiredread-only

Used to return the correlation ID back to the user, in the format
kong:trace:<correlation_id>. This helps us find the relevant logs
when a customer reports an issue.

Example:kong:trace:1234567890

detailstringrequiredread-only

A human readable explanation specific to this occurence of the problem.
This field may contain request/entity data to help the user understand
what went wrong. Enclose variable values in square brackets. Should be
provided as “Sentence case” for direct use in the UI.

Example:Not found

Example