Kong · Capability

Kong Enterprise Admin API — Routes

Kong Enterprise Admin API — Routes. 8 operations. Lead operation: Create a new Route. Self-contained Naftiko capability covering one Kong business surface.

Run with Naftiko KongRoutes

What You Can Do

POST
Createroute — Create a new Route
/v1/{workspace}/routes
POST
Createrouterouteexpression — Create a new Route
/v1/{workspace}/routes-routeexpression
DELETE
Deleteroute — Delete a Route
/v1/{workspace}/routes/{routeidorname}
GET
Getroute — Get a Route
/v1/{workspace}/routes/{routeidorname}
PUT
Upsertroute — Upsert a Route
/v1/{workspace}/routes/{routeidorname}
DELETE
Deleterouterouteexpression — Delete a Route
/v1/{workspace}/routes/routeidorname-routeexpression
GET
Getrouterouteexpression — Get a Route
/v1/{workspace}/routes/routeidorname-routeexpression
PUT
Upsertrouterouteexpression — Upsert a Route
/v1/{workspace}/routes/routeidorname-routeexpression

MCP Tools

create-new-route

Create a new Route

create-new-route-2

Create a new Route

delete-route

Delete a Route

idempotent
get-route

Get a Route

read-only idempotent
upsert-route

Upsert a Route

idempotent
delete-route-2

Delete a Route

idempotent
get-route-2

Get a Route

read-only idempotent
upsert-route-2

Upsert a Route

idempotent

Capability Spec

gateway-admin-routes.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Kong Enterprise Admin API — Routes
  description: 'Kong Enterprise Admin API — Routes. 8 operations. Lead operation: Create a new Route. Self-contained Naftiko
    capability covering one Kong business surface.'
  tags:
  - Kong
  - Routes
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KONG_API_KEY: KONG_API_KEY
capability:
  consumes:
  - type: http
    namespace: gateway-admin-routes
    baseUri: ''
    description: Kong Enterprise Admin API — Routes business capability. Self-contained, no shared references.
    resources:
    - name: workspace-routes
      path: /{workspace}/routes
      operations:
      - name: createroute
        method: POST
        description: Create a new Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: workspace-routes#RouteExpression
      path: /{workspace}/routes#RouteExpression
      operations:
      - name: createrouterouteexpression
        method: POST
        description: Create a new Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: workspace-routes-RouteIdOrName
      path: /{workspace}/routes/{RouteIdOrName}
      operations:
      - name: deleteroute
        method: DELETE
        description: Delete a Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: getroute
        method: GET
        description: Get a Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: upsertroute
        method: PUT
        description: Upsert a Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: workspace-routes-RouteIdOrName}#RouteExpression
      path: /{workspace}/routes/{RouteIdOrName}#RouteExpression
      operations:
      - name: deleterouterouteexpression
        method: DELETE
        description: Delete a Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: getrouterouteexpression
        method: GET
        description: Get a Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: upsertrouterouteexpression
        method: PUT
        description: Upsert a Route
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: Kong-Admin-Token
      value: '{{env.KONG_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: gateway-admin-routes-rest
    port: 8080
    description: REST adapter for Kong Enterprise Admin API — Routes. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/{workspace}/routes
      name: workspace-routes
      description: REST surface for workspace-routes.
      operations:
      - method: POST
        name: createroute
        description: Create a new Route
        call: gateway-admin-routes.createroute
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{workspace}/routes-routeexpression
      name: workspace-routes-routeexpression
      description: REST surface for workspace-routes#RouteExpression.
      operations:
      - method: POST
        name: createrouterouteexpression
        description: Create a new Route
        call: gateway-admin-routes.createrouterouteexpression
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{workspace}/routes/{routeidorname}
      name: workspace-routes-routeidorname
      description: REST surface for workspace-routes-RouteIdOrName.
      operations:
      - method: DELETE
        name: deleteroute
        description: Delete a Route
        call: gateway-admin-routes.deleteroute
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getroute
        description: Get a Route
        call: gateway-admin-routes.getroute
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: upsertroute
        description: Upsert a Route
        call: gateway-admin-routes.upsertroute
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{workspace}/routes/routeidorname-routeexpression
      name: workspace-routes-routeidorname-routeexpression
      description: REST surface for workspace-routes-RouteIdOrName}#RouteExpression.
      operations:
      - method: DELETE
        name: deleterouterouteexpression
        description: Delete a Route
        call: gateway-admin-routes.deleterouterouteexpression
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getrouterouteexpression
        description: Get a Route
        call: gateway-admin-routes.getrouterouteexpression
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: upsertrouterouteexpression
        description: Upsert a Route
        call: gateway-admin-routes.upsertrouterouteexpression
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gateway-admin-routes-mcp
    port: 9090
    transport: http
    description: MCP adapter for Kong Enterprise Admin API — Routes. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-new-route
      description: Create a new Route
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gateway-admin-routes.createroute
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-route-2
      description: Create a new Route
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gateway-admin-routes.createrouterouteexpression
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-route
      description: Delete a Route
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gateway-admin-routes.deleteroute
      outputParameters:
      - type: object
        mapping: $.
    - name: get-route
      description: Get a Route
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gateway-admin-routes.getroute
      outputParameters:
      - type: object
        mapping: $.
    - name: upsert-route
      description: Upsert a Route
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gateway-admin-routes.upsertroute
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-route-2
      description: Delete a Route
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gateway-admin-routes.deleterouterouteexpression
      outputParameters:
      - type: object
        mapping: $.
    - name: get-route-2
      description: Get a Route
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gateway-admin-routes.getrouterouteexpression
      outputParameters:
      - type: object
        mapping: $.
    - name: upsert-route-2
      description: Upsert a Route
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gateway-admin-routes.upsertrouterouteexpression
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.