Upsert a service
Create or Update service using ID or name.
Path Parameters
ID or name of the service to lookup
Example:7fca84d6-7d37-4a74-a7b0-93e576089a41
The ID of your runtime group. This variable is available in the Konnect manager
Example:9524ec7d-36d9-465d-a8c5-83a3c9390458
Body
application/json
Body
The service name.
Example:my-service
The number of retries to execute upon failure to proxy. Default:5.
Default:5
Example:5
The protocol used to communicate with the upstream. Accepted values are: grpc, grpcs, http, https, tcp, tls, tls_passthrough, udp, ws
, wss
. Default: http.
Allowed values:grpcgrpcshttphttpstcptls tls_passthroughudpwswss
Default:http
Example:http
The host of the upstream server. Note that the host value is case sensitive.
Example:example.com
The upstream server port. Default: 80.
Default:80
Example:80
The path to be used in requests to the upstream server.
Example:/some_api
The timeout in milliseconds for establishing a connection to the upstream server. Default: 60000.
Default:6000
Example:6000
The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server. Default: 60000.
Default:6000
Example:6000
The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server. Default: 60000.
Default:6000
Example:6000
An optional set of strings associated with the service for grouping and filtering.
Example:user-level
Certificate to be used as client certificate while TLS handshaking to the upstream server. With form-encoded, the notation is client_certificate.id=<client_certificate id>. With JSON, use client_certificate:{id:<client_certificate id>}.
Show Child Parameters
Whether to enable verification of upstream server TLS certificate. If set to null, then the Nginx default is respected.
Default:true
Maximum depth of chain while verifying Upstream server’s TLS certificate. If set to null, then the Nginx default is respected. Default: null.
Default:null
Example:respected
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. With form-encoded, the notation is ca_certificates[]=4e3ad2e4-0bc4-4638-8e34-c84a417ba39b&ca_certificates[]=51e77dc2-8f3e-4afa-9d0e-0e3bbbcfd515. With JSON, use an Array.
Example:4e3ad2e4-0bc4-4638-8e34-c84a417ba39b
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
Response
application/json
Response
The service response object is returned when creating a new service or retreiving an existing service.
Unix epoch when the resource was last created.
Service enabled boolean
Authentication
Path Parameters
Body
Routes
Gateway routes
List all routes
List all routes
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.
Note: Path handling algorithms v1 was deprecated in Kong 3.0. From Kong 3.0, when router_flavor is set to expressions, route.path_handling will be unconfigurable and the path handling behavior will be v0; when router_flavor is set to traditional_compatible, the path handling behavior will be v0 regardless of the value of route.path_handling. Only router_flavor = traditional will support path_handling v1’ behavior.
Query Parameters
Number of resources to be returned.
Default:100
>= 1<= 1000
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
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
The ID of your runtime group. This variable is available in the Konnect manager
Example:9524ec7d-36d9-465d-a8c5-83a3c9390458
Response
200 application/json
Response
A successful response listing routes
Route entities define rules to match client requests. Every request matching a given route will be proxied to its associated service.
Example:{"hosts":["foo.example.com","foo.example.us"],"id":"56c4566c-14cc-4132-9011-4139fcbbe50a","name":"example-route","paths":["/v1","/v2"],"service":{"id":"bd380f99-659d-415e-b0e7-72ea05df3218"}}
Show Child Parameters
Offset is used to paginate through the API. Provide this value to the next list operation to fetch the next page
Authentication
Path Parameters
Query Parameters
Create a new route
Create a new route
Path Parameters
The ID of your runtime group. This variable is available in the Konnect manager
Example:9524ec7d-36d9-465d-a8c5-83a3c9390458
Body
application/json
Body
Route request body
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”.
An array of the protocols this route should allow
Default:https
Example:tcp
A list of HTTP methods that match this route.
Example:GET
A list of domain names that match this route. Note that the hosts value is case sensitive. With form-encoded, the notation is hosts[]=example.com&hosts[]=foo.test. With JSON, use an Array.
A list of paths that match this route. With form-encoded, the notation is paths[]=/foo&paths[]=/bar. With JSON, use an array. The path can be a regular expression, or a plain text pattern.
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.
Show Child Parameters
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. Accepted values are: 426, 301, 302, 307, 308. Default: 426.
Allowed values:426301302307308
Default:426
Example:426
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.
Default:0
Example:0
When matching a route via one of the paths, strip the matching prefix from the upstream request URL. Default: true.
Default:true
Controls how the service path, route path and requested path are combined when sending a request to the upstream. Accepted values are: v0, v1. Default: v0.
Allowed values:v1v0
Example:v0
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:true
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.
Default:true
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.
Default:true
A list of SNIs that match this route when using stream routing.
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
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
An optional set of strings associated with the route for grouping and filtering.
The service this route is associated to. This is where the route proxies traffic to. With form-encoded, the notation is service.id= or service.name=. With JSON, use “service:{id:<service id>} or service:{name:<service name>}.
Show Child Parameters
Response
application/json
Response
Successfully created route
Route
Route entities define rules to match client requests. Every request matching a given route will be proxied to its associated service.
Unix epoch when the resource was created.
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.
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.
A list of domain names that match this route. Note that the hosts value is case sensitive.
Example:foo.example.com
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.
Default:426
Example:56c4566c-14cc-4132-9011-4139fcbbe50a
A list of HTTP methods that match this route.
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.
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.
Default:v0
A list of paths that match this route.
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
An array of the protocols this route should allow. See the route Object section for a list of accepted protocols. When set to only https, HTTP requests are answered with an upgrade error. When set to only http, HTTPS requests are answered with an error.
Default:http, https
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
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
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
The service this route is associated to. This is where the route proxies traffic to.
Show Child Parameters
A list of SNIs that match this route when using stream routing.
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.
When matching a route via one of the paths, strip the matching prefix from the upstream request URL.
Default:true
An optional set of strings associated with the route for grouping and filtering.
Unix epoch when the resource was last updated.
Authentication
Path Parameters
Body
Delete a route
Delete a route.
Path Parameters
The ID of your runtime group. This variable is available in the Konnect manager
Example:9524ec7d-36d9-465d-a8c5-83a3c9390458
Response
204
Response
Successfully deleted route or the resource didn’t exist