Kong Routes API
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 the associated service. You need at least one matching rule that applies to the protocol being matched by the route.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 entrypoints in Kong Gateway leading to different upstream services of your infrastructure.Depending on the protocol, one of the following attributes must be set:- `http`: At least one of `methods`, `hosts`, `headers`, or `paths`- `https`: At least one of `methods`, `hosts`, `headers`, `paths`, or `snis`- `tcp`: At least one of `sources` or `destinations`- `tls`: at least one of `sources`, `destinations`, or `snis`- `tls_passthrough`: set `snis`- `grpc`: At least one of `hosts`, `headers`, or `paths`- `grpcs`: At least one of `hosts`, `headers`, `paths`, or `snis`- `ws`: At least one of `hosts`, `headers`, or `paths`- `wss`: At least one of `hosts`, `headers`, `paths`, or `snis` A route can't have both `tls` and `tls_passthrough` protocols at same time. Learn more about the router:- [Configure routes using expressions](https://developer.konghq.com/gateway/routing/expressions/)
Kong Routes API is one of 139 APIs that Kong publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
This API exposes 1 JSON Schema definition.
Tagged areas include Routes. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a JSON-LD context, a GitHub repository, an API reference, authentication docs, and 1 JSON Schema.
This API exposes 18 operations across 8 paths, and defines 9 schemas. It is described by OpenAPI 3.1.0, at version 3.14.0.
Requests are made against a single base URL, {protocol}://{hostname}:{port}{path}.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 1
Kong Routes API declares
1 security scheme
for authenticating requests.
An API key is passed in the header as Kong-Admin-Token (adminToken).
By default, every request must be authenticated.
Paths & Operations 18
Across 8 paths, the API surfaces 18 operations — 4 DELETE, 6 GET, 4 POST, 4 PUT. Each is listed below with its method, path, parameters, and response codes.
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 gi…
Schemas 9
The contract defines 9 schemas that model the data the API accepts and returns. The most detailed are RouteJson (21 properties), RouteJson_2 (21 properties), RouteExpression (15 properties), RouteExpression_2 (15 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Kong 12
Other APIs Kong publishes across the network.