Upsert a Route associated with a Service

Create or Update a Route associated with a Service using ID or name.

put

Path Parameters

ServiceIdstringrequired

ID of the Service to lookup

Example:7fca84d6-7d37-4a74-a7b0-93e576089a41

RouteIdstringrequired

ID of the Route to lookup

Example:a4326a41-aa12-44e3-93e4-6b6e58bfb9d7

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Body

application/json

Description of the Route

RouteWithoutParents

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.

Response

200 application/json

Successfully upserted Route

Route

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

put/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes/{RouteId}

Body

{}
 
200 application/json

SNIs

An SNI object represents a many-to-one mapping of hostnames to a certificate.



A certificate object can have many hostnames associated with it. When Kong Gateway receives an SSL request, it uses the SNI field in the Client Hello to look up the certificate object based on the SNI associated with the certificate.

List all SNIs associated with a Certificate in a workspace

List all SNIs associated with a Certificate in a workspace

get

Query Parameters

sizeinteger

Number of resources to be returned.

Default:100

>= 1<= 1000

offsetstring

Offset from which to return the next set of resources. Use the value of the ‘offset’ field from the response of a list operation as input here to paginate through all the resources

tagsstring

A list of tags to filter the list of resources on. Multiple tags can be concatenated using ‘,’ to mean AND or using ‘/’ to mean OR.

Example:tag1,tag2

Path Parameters

CertificateIdstringrequired

ID of the Certificate to lookup

Example:ddf3cdaa-3329-4961-822a-ce6dbd38eff7

workspacestring(string)required

The name of the workspace

Example:team-payments

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Response

200 application/json

A successful response listing SNIs

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

Example:{"certificate":{"id":"bd380f99-659d-415e-b0e7-72ea05df3218"},"id":"36c4566c-14cc-4132-9011-4139fcbbe50a","name":"some.example.org"}

* Additional properties are NOT allowed.
Show Child Parameters
nextstring

URI to the next page (may be null)

offsetstring

Offset is used to paginate through the API. Provide this value to the next list operation to fetch the next page

get/control-planes/{controlPlaneId}/core-entities/{workspace}/certificates/{CertificateId}/snis
 
200 application/json

Create a new SNI associated with a Certificate in a workspace

Create a new SNI associated with a Certificate in a workspace

post

Path Parameters

CertificateIdstringrequired

ID of the Certificate to lookup

Example:ddf3cdaa-3329-4961-822a-ce6dbd38eff7

workspacestring(string)required

The name of the workspace

Example:team-payments

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Body

application/json

Description of new SNI for creation

SNIWithoutParents

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.

Response

201 application/json

Successfully created SNI

SNI

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.

post/control-planes/{controlPlaneId}/core-entities/{workspace}/certificates/{CertificateId}/snis

Body

{ "id": "36c4566c-14cc-4132-9011-4139fcbbe50a", "name": "some.example.org" }
 
201 application/json

Delete a an SNI associated with a Certificate in a workspace

Delete a an SNI associated with a Certificate using ID or name in a workspace.

delete

Path Parameters

CertificateIdstringrequired

ID of the Certificate to lookup

Example:ddf3cdaa-3329-4961-822a-ce6dbd38eff7

SNIIdstringrequired

ID of the SNI to lookup

Example:64c17a1a-b7d7-4a65-a5a4-42e4a7016e7f

workspacestring(string)required

The name of the workspace

Example:team-payments

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Response

204

Successfully deleted SNI or the resource didn’t exist

delete/control-planes/{controlPlaneId}/core-entities/{workspace}/certificates/{CertificateId}/snis/{SNIId}
 
204