Kong · Capability

Kong Enterprise Admin API — Keys

Kong Enterprise Admin API — Keys. 4 operations. Lead operation: Create a new Key. Self-contained Naftiko capability covering one Kong business surface.

Run with Naftiko KongKeys

What You Can Do

POST
Createkey — Create a new Key
/v1/{workspace}/keys
DELETE
Deletekey — Delete a Key
/v1/{workspace}/keys/{keyidorname}
GET
Getkey — Get a Key
/v1/{workspace}/keys/{keyidorname}
PUT
Upsertkey — Upsert a Key
/v1/{workspace}/keys/{keyidorname}

MCP Tools

create-new-key

Create a new Key

delete-key

Delete a Key

idempotent
get-key

Get a Key

read-only idempotent
upsert-key

Upsert a Key

idempotent

Capability Spec

gateway-admin-keys.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Kong Enterprise Admin API — Keys
  description: 'Kong Enterprise Admin API — Keys. 4 operations. Lead operation: Create a new Key. Self-contained Naftiko capability
    covering one Kong business surface.'
  tags:
  - Kong
  - Keys
  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-keys
    baseUri: ''
    description: Kong Enterprise Admin API — Keys business capability. Self-contained, no shared references.
    resources:
    - name: workspace-keys
      path: /{workspace}/keys
      operations:
      - name: createkey
        method: POST
        description: Create a new Key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: workspace-keys-KeyIdOrName
      path: /{workspace}/keys/{KeyIdOrName}
      operations:
      - name: deletekey
        method: DELETE
        description: Delete a Key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: getkey
        method: GET
        description: Get a Key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: upsertkey
        method: PUT
        description: Upsert a Key
        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-keys-rest
    port: 8080
    description: REST adapter for Kong Enterprise Admin API — Keys. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/{workspace}/keys
      name: workspace-keys
      description: REST surface for workspace-keys.
      operations:
      - method: POST
        name: createkey
        description: Create a new Key
        call: gateway-admin-keys.createkey
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{workspace}/keys/{keyidorname}
      name: workspace-keys-keyidorname
      description: REST surface for workspace-keys-KeyIdOrName.
      operations:
      - method: DELETE
        name: deletekey
        description: Delete a Key
        call: gateway-admin-keys.deletekey
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getkey
        description: Get a Key
        call: gateway-admin-keys.getkey
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: upsertkey
        description: Upsert a Key
        call: gateway-admin-keys.upsertkey
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gateway-admin-keys-mcp
    port: 9090
    transport: http
    description: MCP adapter for Kong Enterprise Admin API — Keys. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-new-key
      description: Create a new Key
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gateway-admin-keys.createkey
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-key
      description: Delete a Key
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gateway-admin-keys.deletekey
      outputParameters:
      - type: object
        mapping: $.
    - name: get-key
      description: Get a Key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gateway-admin-keys.getkey
      outputParameters:
      - type: object
        mapping: $.
    - name: upsert-key
      description: Upsert a Key
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gateway-admin-keys.upsertkey
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.