PluginWithoutParents

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.
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.

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.

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

Route

One Of
created_atinteger

Unix epoch when the resource was created.

destinationsarray[object]

A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”.

Show Child Parameters
headersobject

One or more lists of values indexed by header name that will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. When headers contains only one value and that value starts with the special prefix ~*, the value is interpreted as a regular expression.

hostsarray[string]

A list of domain names that match this Route. Note that the hosts value is case sensitive.

https_redirect_status_codeinteger

The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the https protocol.

Allowed values:301302307308426

Default:426

idstring

A string representing a UUID (universally unique identifier).

methodsarray[string]

A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.

namestring

The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named “test” and “Test”.

path_handlingstring

Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior.

Allowed values:v0v1

Default:v0

pathsarray[string]

A string representing a router path. It must start with a forward slash (‘/’) for a fixed path, or the sequence ‘~/’ for a regex path. It must not have empty segments.

preserve_hostboolean

When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers. If set to false, the upstream Host header will be that of the Service’s host.

Default:false

protocolsarray[string]

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

Allowed values:grpcgrpcshttphttpstcptlstls_passthroughudpwswss

Default:https

>= 1 characters

regex_priorityinteger

A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same regex_priority, the older one (lowest created_at) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones).

Default:0

request_bufferingboolean

Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding.

Default:true

response_bufferingboolean

Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding.

Default:true

serviceobject

The Service this Route is associated to. This is where the Route proxies traffic to.

Show Child Parameters
snisarray[string]

A string representing a wildcard host name, such as *.example.com.

sourcesarray[object]

A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”.

Show Child Parameters
strip_pathboolean

When matching a Route via one of the paths, strip the matching prefix from the upstream request URL.

Default:true

tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example

RouteExpression

object

Route entities define rules to match client requests. Each Route is associated with a Service, and a Service may have multiple Routes associated to it. Every request matching a given Route will be proxied to its associated Service. The combination of Routes and Services (and the separation of concerns between them) offers a powerful routing mechanism with which it is possible to define fine-grained entry-points in Kong leading to different upstream services of your infrastructure. You need at least one matching rule that applies to the protocol being matched by the Route.

* Additional properties are NOT allowed.
created_atinteger

Unix epoch when the resource was created.

expressionstring

Use Router Expression to perform route match. This option is only available when router_flavor is set to expressions.

https_redirect_status_codeinteger

The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the https protocol.

Allowed values:301302307308426

Default:426

idstring

A string representing a UUID (universally unique identifier).

namestring

The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named “test” and “Test”.

path_handlingstring

Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior.

Allowed values:v0v1

Default:v0

preserve_hostboolean

When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers. If set to false, the upstream Host header will be that of the Service’s host.

Default:false

priorityinteger

A number used to specify the matching order for expression routes. The higher the priority, the sooner an route will be evaluated. This field is ignored unless expression field is set.

Default:0

>= 0<= 70368744177663

protocolsarray[string]

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

Allowed values:grpcgrpcshttphttpstcptlstls_passthroughudpwswss

Default:https

>= 1 characters

request_bufferingboolean

Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding.

Default:true

response_bufferingboolean

Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding.

Default:true

serviceobject

The Service this Route is associated to. This is where the Route proxies traffic to.

Show Child Parameters
strip_pathboolean

When matching a Route via one of the paths, strip the matching prefix from the upstream request URL.

Default:true

tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example

RouteJson

object

Route entities define rules to match client requests. Each Route is associated with a Service, and a Service may have multiple Routes associated to it. Every request matching a given Route will be proxied to its associated Service. The combination of Routes and Services (and the separation of concerns between them) offers a powerful routing mechanism with which it is possible to define fine-grained entry-points in Kong leading to different upstream services of your infrastructure. You need at least one matching rule that applies to the protocol being matched by the Route.

* Additional properties are NOT allowed.
created_atinteger

Unix epoch when the resource was created.

destinationsarray[object]

A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”.

Show Child Parameters
headersobject

One or more lists of values indexed by header name that will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. When headers contains only one value and that value starts with the special prefix ~*, the value is interpreted as a regular expression.

hostsarray[string]

A list of domain names that match this Route. Note that the hosts value is case sensitive.

https_redirect_status_codeinteger

The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the https protocol.

Allowed values:301302307308426

Default:426

idstring

A string representing a UUID (universally unique identifier).

methodsarray[string]

A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.

namestring

The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named “test” and “Test”.

path_handlingstring

Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior.

Allowed values:v0v1

Default:v0

pathsarray[string]

A string representing a router path. It must start with a forward slash (‘/’) for a fixed path, or the sequence ‘~/’ for a regex path. It must not have empty segments.

preserve_hostboolean

When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers. If set to false, the upstream Host header will be that of the Service’s host.

Default:false

protocolsarray[string]

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

Allowed values:grpcgrpcshttphttpstcptlstls_passthroughudpwswss

Default:https

>= 1 characters

regex_priorityinteger

A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same regex_priority, the older one (lowest created_at) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones).

Default:0

request_bufferingboolean

Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding.

Default:true

response_bufferingboolean

Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding.

Default:true

serviceobject

The Service this Route is associated to. This is where the Route proxies traffic to.

Show Child Parameters
snisarray[string]

A string representing a wildcard host name, such as *.example.com.

sourcesarray[object]

A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”.

Show Child Parameters
strip_pathboolean

When matching a Route via one of the paths, strip the matching prefix from the upstream request URL.

Default:true

tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example

RouteWithoutParents

One Of
created_atinteger

Unix epoch when the resource was created.

destinationsarray[object]

A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”.

Show Child Parameters
headersobject

One or more lists of values indexed by header name that will cause this Route to match if present in the request. The Host header cannot be used with this attribute: hosts should be specified using the hosts attribute. When headers contains only one value and that value starts with the special prefix ~*, the value is interpreted as a regular expression.

hostsarray[string]

A list of domain names that match this Route. Note that the hosts value is case sensitive.

https_redirect_status_codeinteger

The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the https protocol.

Allowed values:301302307308426

Default:426

idstring

A string representing a UUID (universally unique identifier).

methodsarray[string]

A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.

namestring

The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named “test” and “Test”.

path_handlingstring

Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior.

Allowed values:v0v1

Default:v0

pathsarray[string]

A string representing a router path. It must start with a forward slash (‘/’) for a fixed path, or the sequence ‘~/’ for a regex path. It must not have empty segments.

preserve_hostboolean

When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers. If set to false, the upstream Host header will be that of the Service’s host.

Default:false

protocolsarray[string]

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

Allowed values:grpcgrpcshttphttpstcptlstls_passthroughudpwswss

Default:https

>= 1 characters

regex_priorityinteger

A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same regex_priority, the older one (lowest created_at) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones).

Default:0

request_bufferingboolean

Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding.

Default:true

response_bufferingboolean

Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding.

Default:true

serviceobject

The Service this Route is associated to. This is where the Route proxies traffic to.

Show Child Parameters
snisarray[string]

A string representing a wildcard host name, such as *.example.com.

sourcesarray[object]

A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”.

Show Child Parameters
strip_pathboolean

When matching a Route via one of the paths, strip the matching prefix from the upstream request URL.

Default:true

tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example