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

GitHub OpenAPI

Operations 18

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /{workspace}/routes Create a route in a workspace · Create a new Route #
Ask an LLM
“How do I create a route in a Konnect workspace?”
“Can a workspace route match by host, path or method?”
Tell an agent
Create a route named {name} in workspace {workspace}.
Create a route in workspace {workspace} that matches {hosts} and forwards to service {service}.
POST /{workspace}/routes#RouteExpression Create a route with a router expression · Create a new Route #
Ask an LLM
“Can I create a route using a router expression instead of host and path?”
“Is there a way to set priority on an expression route?”
Tell an agent
Create an expression route named {name} in workspace {workspace} with expression {expression}.
Create an expression route in workspace {workspace} with priority {priority}.
DELETE /{workspace}/routes/{RouteIdOrName} Delete a route from a workspace · Delete a Route #
Ask an LLM
“How do I delete a route from a Konnect workspace?”
“Can I remove a workspace route by name?”
Tell an agent destructive · confirm first
Delete route {RouteIdOrName} from workspace {workspace}.
Remove route {RouteIdOrName} in {workspace}.
GET /{workspace}/routes/{RouteIdOrName} Get a route by ID or name · Get a Route #
Ask an LLM
“How do I look up a route by its name in a workspace?”
“What hosts and methods does a workspace route use?”
Tell an agent
Get route {RouteIdOrName} in workspace {workspace}.
Show the hosts and methods of route {RouteIdOrName} in {workspace}.
PUT /{workspace}/routes/{RouteIdOrName} Create or update a route in a workspace · Upsert a Route #
Ask an LLM
“How do I create a route in a workspace, or update it if it already exists?”
“Can I change a workspace route's host after creating it?”
Tell an agent
Upsert route {RouteIdOrName} in workspace {workspace} with name {name}.
Update the hosts on route {RouteIdOrName} in {workspace} to {hosts}.
DELETE /{workspace}/routes/{RouteIdOrName}#RouteExpression Delete a route with a router expression · Delete a Route #
Ask an LLM
“How do I delete an expression route from a workspace?”
“Can I remove a router expression route by name?”
Tell an agent destructive · confirm first
Delete expression route {RouteIdOrName} from workspace {workspace}.
Remove router expression route {RouteIdOrName} in {workspace}.
GET /{workspace}/routes/{RouteIdOrName}#RouteExpression Look up a route by name or ID · Get a Route #
Ask an LLM
“How do I find a service route when I know its name instead of its ID?”
“Can I look up a route by name within a workspace?”
Tell an agent
Look up route {RouteIdOrName} in workspace {workspace}.
Find the route named {RouteIdOrName} using the workspace {workspace} expression.
PUT /{workspace}/routes/{RouteIdOrName}#RouteExpression Create or update a route with a router expression · Upsert a Route #
Ask an LLM
“How do I create an expression route or update it if it exists?”
“Can I set the priority on an expression route?”
Tell an agent
Upsert expression route {RouteIdOrName} in workspace {workspace} with expression {expression}.
Set the priority of expression route {RouteIdOrName} in {workspace} to {priority}.
GET /v2/control-planes/{controlPlaneId}/core-entities/routes List routes in a Konnect control plane · List all Routes #
Ask an LLM
“Which routes exist in my Konnect control plane?”
“Can I list only the routes that match a name substring?”
Tell an agent
List all routes in Konnect control plane {controlPlaneId}.
List routes in control plane {controlPlaneId} whose name contains {name}.
POST /v2/control-planes/{controlPlaneId}/core-entities/routes Create a route in a Konnect control plane · Create a new Route #
Ask an LLM
“How do I create a route in a Konnect control plane?”
“Can I add a route to a Konnect control plane by its ID?”
Tell an agent
Create a route in Konnect control plane {controlPlaneId}.
Add a new route to Konnect control plane {controlPlaneId}.
DELETE /v2/control-planes/{controlPlaneId}/core-entities/routes/{RouteId} Delete a route from a Konnect control plane · Delete a Route #
Ask an LLM
“How do I delete a route from a Konnect control plane?”
“Can I remove a Konnect control plane route by ID?”
Tell an agent destructive · confirm first
Delete route {RouteId} from Konnect control plane {controlPlaneId}.
Remove Konnect control plane route {RouteId}.
GET /v2/control-planes/{controlPlaneId}/core-entities/routes/{RouteId} Get a route by ID · Get a Route #
Ask an LLM
“How do I fetch one route by its ID over the v2 control plane API?”
“Which call returns a single route from the Konnect control plane?”
Tell an agent
Get route {RouteId} from control plane {controlPlaneId} using the v2 core entity path.
Fetch route {RouteId} on core plane {controlPlaneId}.
PUT /v2/control-planes/{controlPlaneId}/core-entities/routes/{RouteId} Upsert a route in a Konnect control plane · Upsert a Route #
Ask an LLM
“How do I create a route in a Konnect control plane or update it if it exists?”
“Can I change a Konnect control plane route's host?”
Tell an agent
Upsert route {RouteId} in Konnect control plane {controlPlaneId}.
Update the hosts on Konnect control plane route {RouteId}.
GET /v2/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes List routes for a service in a Konnect control plane · List all Routes associated with a Service #
Ask an LLM
“Which routes point to a particular service in my Konnect control plane?”
“Can I list only the routes tagged with a given tag for a service?”
Tell an agent
List routes for service {ServiceId} in Konnect control plane {controlPlaneId}.
Show Konnect control plane routes for service {ServiceId} tagged {tags}.
POST /v2/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes Create a route for a service in a Konnect control plane · Create a new Route associated with a Service #
Ask an LLM
“How do I create a route that points to a Konnect control plane service?”
“Can I add a route to a service in a Konnect control plane?”
Tell an agent
Create a route for service {ServiceId} in Konnect control plane {controlPlaneId}.
Add a new route to service {ServiceId} in control plane {controlPlaneId}.
DELETE /v2/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes/{RouteId} Delete a route for a service in a Konnect control plane · Delete a a Route associated with a Service #
Ask an LLM
“How do I delete a route from a service in a Konnect control plane?”
“Can I remove a Konnect control plane route for a service?”
Tell an agent destructive · confirm first
Delete route {RouteId} for service {ServiceId} in Konnect control plane {controlPlaneId}.
Remove Konnect control plane route {RouteId} from service {ServiceId}.
GET /v2/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes/{RouteId} Get a route on a service · Get a Route associated with a Service #
Ask an LLM
“How do I see which route is attached to a given service?”
“Can I look up a route by ID for one specific service?”
Tell an agent
Get route {RouteId} attached to service {ServiceId} on control plane {controlPlaneId}.
Look up route {RouteId} under service {ServiceId} in Konnect control plane {controlPlaneId}.
PUT /v2/control-planes/{controlPlaneId}/core-entities/services/{ServiceId}/routes/{RouteId} Create or update a route on a service · Upsert a Route associated with a Service #
Ask an LLM
“How do I create a route on a service if it doesn't exist yet, or update it if it does?”
“Can I replace the definition of a specific route under a service by its ID?”
Tell an agent
Upsert route {RouteId} on service {ServiceId} in control plane {controlPlaneId}.
Create or replace the route {RouteId} under service {ServiceId} in Konnect control plane {controlPlaneId} with a PUT.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/kong:kong-routes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kong-routes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kong Routes API
  version: 3.14.0
  contact:
    email: support@konghq.com
    name: Kong Inc
    url: https://konghq.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  x-refined-note:
  - x-extensions-note differs across the merged source definitions and was not carried
  - x-oas-source differs across the merged source definitions and was not carried
  - x-oas-source-link differs across the merged source definitions and was not carried
  description: 'Operations tagged Routes across 2 of this provider''s published API definitions: kong-gateway-admin-api.yml, kong-konnect-platform-api.yml. Each path carries the servers of the definition it was published in.'
servers:
- description: Default Admin API URL
  url: '{protocol}://{hostname}:{port}{path}'
  variables:
    hostname:
      default: localhost
      description: Hostname for Kong's Admin API
    path:
      default: /
      description: Base path for Kong's Admin API
    port:
      default: '8001'
      description: Port for Kong's Admin API
    protocol:
      default: http
      description: Protocol for requests to Kong's Admin API
      enum:
      - http
      - https
- url: https://global.api.konghq.com
- url: https://us.api.konghq.com
- url: https://eu.api.konghq.com
- url: https://au.api.konghq.com
tags:


# --- truncated at 32 KB (52 KB total) ---
# Full source: https://artifacts.apis.io/kong/openapi/kong-routes-api-openapi.yml