Kong · Schema
Route
A Route defines rules to match client requests. Each Route is associated with a Service, and a Service may have multiple Routes. When a request matches a Route, Kong proxies the request to the associated Service.
API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| id | string | The unique identifier of the Route. |
| name | string | An optional human-readable name for the Route. |
| protocols | array | An array of the protocols this Route should allow. |
| methods | array | A list of HTTP methods that match this Route. |
| hosts | array | A list of domain names that match this Route. |
| paths | array | A list of paths that match this Route. |
| headers | object | One or more lists of values indexed by header name that will cause this Route to match if present in the request. |
| snis | array | A list of SNIs that match this Route when using stream routing. |
| sources | array | A list of IP sources of incoming connections that match this Route (stream routing). |
| destinations | array | A list of IP destinations of incoming connections that match this Route (stream routing). |
| https_redirect_status_code | integer | The status code Kong responds with when all properties of a Route match except the protocol. |
| regex_priority | integer | A number used to choose which Route resolves a given request when several Routes match it using regexes simultaneously. |
| strip_path | boolean | When matching a Route via one of the paths, strip the matching prefix from the upstream request URL. |
| path_handling | string | Controls how the Service path, Route path, and requested path are combined when sending a request to the upstream. |
| preserve_host | boolean | When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers. |
| request_buffering | boolean | Whether to enable request body buffering. |
| response_buffering | boolean | Whether to enable response body buffering. |
| tags | array | An optional set of strings for grouping and filtering. |
| service | object | The Service this Route is associated with. |
| expression | string | The router expression for the Route (expressions router mode). |
| priority | integer | The priority of the Route in expressions router mode. |
| created_at | integer | Unix epoch timestamp of when the entity was created. |
| updated_at | integer | Unix epoch timestamp of when the entity was last updated. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Route",
"type": "object",
"description": "A Route defines rules to match client requests. Each Route is associated with a Service, and a Service may have multiple Routes. When a request matches a Route, Kong proxies the request to the associated Service.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the Route."
},
"name": {
"type": "string",
"description": "An optional human-readable name for the Route."
},
"protocols": {
"type": "array",
"description": "An array of the protocols this Route should allow."
},
"methods": {
"type": "array",
"description": "A list of HTTP methods that match this Route."
},
"hosts": {
"type": "array",
"description": "A list of domain names that match this Route."
},
"paths": {
"type": "array",
"description": "A list of paths that match this Route."
},
"headers": {
"type": "object",
"description": "One or more lists of values indexed by header name that will cause this Route to match if present in the request."
},
"snis": {
"type": "array",
"description": "A list of SNIs that match this Route when using stream routing."
},
"sources": {
"type": "array",
"description": "A list of IP sources of incoming connections that match this Route (stream routing)."
},
"destinations": {
"type": "array",
"description": "A list of IP destinations of incoming connections that match this Route (stream routing)."
},
"https_redirect_status_code": {
"type": "integer",
"description": "The status code Kong responds with when all properties of a Route match except the protocol."
},
"regex_priority": {
"type": "integer",
"description": "A number used to choose which Route resolves a given request when several Routes match it using regexes simultaneously."
},
"strip_path": {
"type": "boolean",
"description": "When matching a Route via one of the paths, strip the matching prefix from the upstream request URL."
},
"path_handling": {
"type": "string",
"description": "Controls how the Service path, Route path, and requested path are combined when sending a request to the upstream."
},
"preserve_host": {
"type": "boolean",
"description": "When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers."
},
"request_buffering": {
"type": "boolean",
"description": "Whether to enable request body buffering."
},
"response_buffering": {
"type": "boolean",
"description": "Whether to enable response body buffering."
},
"tags": {
"type": "array",
"description": "An optional set of strings for grouping and filtering."
},
"service": {
"type": "object",
"description": "The Service this Route is associated with."
},
"expression": {
"type": "string",
"description": "The router expression for the Route (expressions router mode)."
},
"priority": {
"type": "integer",
"description": "The priority of the Route in expressions router mode."
},
"created_at": {
"type": "integer",
"description": "Unix epoch timestamp of when the entity was created."
},
"updated_at": {
"type": "integer",
"description": "Unix epoch timestamp of when the entity was last updated."
}
}
}