RouteWithoutParents

One Of
created_atinteger

Unix epoch when the resource was created.

descriptionstring

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

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

managed_byobject

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

* Additional properties are allowed.
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

SNI

object

An SNI object represents a many-to-one mapping of hostnames to a certificate. That is, a certificate object can have many hostnames associated with it; when Kong receives an SSL request, it uses the SNI field in the Client Hello to lookup the certificate object based on the SNI associated with the certificate.

* Additional properties are NOT allowed.
certificateobjectrequired

The id (a UUID) of the certificate with which to associate the SNI hostname. The Certificate must have a valid private key associated with it to be used by the SNI object.

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.

idstring

A string representing a UUID (universally unique identifier).

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 SNI name to associate with the given certificate.

tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example

SNIWithoutParents

object

An SNI object represents a many-to-one mapping of hostnames to a certificate. That is, a certificate object can have many hostnames associated with it; when Kong receives an SSL request, it uses the SNI field in the Client Hello to lookup the certificate object based on the SNI associated with the certificate.

* Additional properties are NOT allowed.
certificateobject

The id (a UUID) of the certificate with which to associate the SNI hostname. The Certificate must have a valid private key associated with it to be used by the SNI object.

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.

idstring

A string representing a UUID (universally unique identifier).

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 SNI name to associate with the given certificate.

tagsarray[string]

A string representing a tag.

updated_atinteger

Unix epoch when the resource was last updated.

Example

Service

object

Service entities, as the name implies, are abstractions of each of your own upstream services. Examples of Services would be a data transformation microservice, a billing API, etc. The main attribute of a Service is its URL (where Kong should proxy traffic to), which can be set as a single string or by specifying its protocol, host, port and path individually. Services are associated to Routes (a Service can have many Routes associated with it). Routes are entry-points in Kong and define rules to match client requests. Once a Route is matched, Kong proxies the request to its associated Service. See the [Proxy Reference][proxy-reference] for a detailed explanation of how Kong proxies traffic.

* Additional properties are NOT allowed.
ca_certificatesarray[string]

Array of CA Certificate object UUIDs that are used to build the trust store while verifying upstream server’s TLS certificate. If set to null when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).

client_certificateobject

Certificate to be used as client certificate while TLS handshaking to the upstream server.

Show Child Parameters
connect_timeoutinteger

The timeout in milliseconds for establishing a connection to the upstream server.

Default:60000

>= 1<= 2147483646

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 Service is active. If set to false, the proxy behavior will be as if any routes attached to it do not exist (404). Default: true.

Default:true

hoststringrequired

The host of the upstream server. Note that the host value is case sensitive.

idstring

A string representing a UUID (universally unique identifier).

>= 1 characters

managed_byobject

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

* Additional properties are allowed.
namestring

The Service name.

pathstring

The path to be used in requests to the upstream server.

portinteger

The upstream server port.

Default:80

>= 0<= 65535

protocolstring

The protocol used to communicate with the upstream.

Allowed values:grpcgrpcshttphttpstcptlstls_passthroughudpwswss

Default:http

read_timeoutinteger

The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server.

Default:60000

>= 1<= 2147483646

retriesinteger

The number of retries to execute upon failure to proxy.

Default:5

>= 0<= 32767

tagsarray[string]

A string representing a tag.

tls_sansobject

Additional Subject Alternative Names that can be matched on Upstream server’s TLS certificate (in addition to host).

Show Child Parameters
tls_verifyboolean

Whether to enable verification of upstream server TLS certificate. If set to null, then the Nginx default is respected.

tls_verify_depthinteger

Maximum depth of chain while verifying Upstream server’s TLS certificate. If set to null, then the Nginx default is respected.

>= 0<= 64

updated_atinteger

Unix epoch when the resource was last updated.

urlstring

Helper field to set protocol, host, port and path using a URL. This field is write-only and is not returned in responses.

write_timeoutinteger

The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server.

Default:60000

>= 1<= 2147483646

Example

Target

object

A target is an ip address/hostname with a port that identifies an instance of a backend service. Every upstream can have many targets, and the targets can be dynamically added, modified, or deleted. Changes take effect on the fly. To disable a target, post a new one with weight=0; alternatively, use the DELETE convenience method to accomplish the same. The current target object definition is the one with the latest created_at.

* Additional properties are NOT allowed.
created_atnumber

Unix epoch when the resource was created.

descriptionstring

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

failoverboolean

Whether to use this target only as backup or not.

Default:false

idstring

A string representing a UUID (universally unique identifier).

managed_byobject

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

* Additional properties are allowed.
tagsarray[string]

A string representing a tag.

targetstringrequired

The target address (ip or hostname) and port. If the hostname resolves to an SRV record, the port value will be overridden by the value from the DNS record.

updated_atnumber

Unix epoch when the resource was last updated.

upstreamobject

The unique identifier or the name of the upstream for which to update the target.

Show Child Parameters
weightinteger

The weight this target gets within the upstream loadbalancer (0-65535). If the hostname resolves to an SRV record, the weight value will be overridden by the value from the DNS record.

Default:100

>= 0<= 65535

Example