Apache APISIX · Capability

Apache APISIX Admin API — Upstreams

Apache APISIX Admin API — Upstreams. 6 operations. Lead operation: Apache APISIX List All Upstreams. Self-contained Naftiko capability covering one Apache Apisix business surface.

Run with Naftiko Apache ApisixUpstreams

What You Can Do

GET
Listupstreams — Apache APISIX List All Upstreams
/v1/upstreams
POST
Createupstream — Apache APISIX Create an Upstream
/v1/upstreams
GET
Getupstream — Apache APISIX Get an Upstream
/v1/upstreams/{upstream-id}
PUT
Createorupdateupstream — Apache APISIX Create or Update an Upstream
/v1/upstreams/{upstream-id}
PATCH
Patchupstream — Apache APISIX Patch an Upstream
/v1/upstreams/{upstream-id}
DELETE
Deleteupstream — Apache APISIX Delete an Upstream
/v1/upstreams/{upstream-id}

MCP Tools

apache-apisix-list-all-upstreams

Apache APISIX List All Upstreams

read-only idempotent
apache-apisix-create-upstream

Apache APISIX Create an Upstream

apache-apisix-get-upstream

Apache APISIX Get an Upstream

read-only idempotent
apache-apisix-create-update-upstream

Apache APISIX Create or Update an Upstream

idempotent
apache-apisix-patch-upstream

Apache APISIX Patch an Upstream

idempotent
apache-apisix-delete-upstream

Apache APISIX Delete an Upstream

idempotent

Capability Spec

admin-upstreams.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Apache APISIX Admin API — Upstreams
  description: 'Apache APISIX Admin API — Upstreams. 6 operations. Lead operation: Apache APISIX List All Upstreams. Self-contained
    Naftiko capability covering one Apache Apisix business surface.'
  tags:
  - Apache Apisix
  - Upstreams
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    APACHE_APISIX_API_KEY: APACHE_APISIX_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-upstreams
    baseUri: http://127.0.0.1:9180/apisix/admin
    description: Apache APISIX Admin API — Upstreams business capability. Self-contained, no shared references.
    resources:
    - name: upstreams
      path: /upstreams
      operations:
      - name: listupstreams
        method: GET
        description: Apache APISIX List All Upstreams
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createupstream
        method: POST
        description: Apache APISIX Create an Upstream
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: upstreams-upstream_id
      path: /upstreams/{upstream_id}
      operations:
      - name: getupstream
        method: GET
        description: Apache APISIX Get an Upstream
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createorupdateupstream
        method: PUT
        description: Apache APISIX Create or Update an Upstream
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: patchupstream
        method: PATCH
        description: Apache APISIX Patch an Upstream
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteupstream
        method: DELETE
        description: Apache APISIX Delete an Upstream
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: X-API-KEY
      value: '{{env.APACHE_APISIX_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: admin-upstreams-rest
    port: 8080
    description: REST adapter for Apache APISIX Admin API — Upstreams. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/upstreams
      name: upstreams
      description: REST surface for upstreams.
      operations:
      - method: GET
        name: listupstreams
        description: Apache APISIX List All Upstreams
        call: admin-upstreams.listupstreams
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createupstream
        description: Apache APISIX Create an Upstream
        call: admin-upstreams.createupstream
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/upstreams/{upstream-id}
      name: upstreams-upstream-id
      description: REST surface for upstreams-upstream_id.
      operations:
      - method: GET
        name: getupstream
        description: Apache APISIX Get an Upstream
        call: admin-upstreams.getupstream
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: createorupdateupstream
        description: Apache APISIX Create or Update an Upstream
        call: admin-upstreams.createorupdateupstream
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchupstream
        description: Apache APISIX Patch an Upstream
        call: admin-upstreams.patchupstream
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteupstream
        description: Apache APISIX Delete an Upstream
        call: admin-upstreams.deleteupstream
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-upstreams-mcp
    port: 9090
    transport: http
    description: MCP adapter for Apache APISIX Admin API — Upstreams. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: apache-apisix-list-all-upstreams
      description: Apache APISIX List All Upstreams
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-upstreams.listupstreams
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-apisix-create-upstream
      description: Apache APISIX Create an Upstream
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: admin-upstreams.createupstream
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-apisix-get-upstream
      description: Apache APISIX Get an Upstream
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-upstreams.getupstream
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-apisix-create-update-upstream
      description: Apache APISIX Create or Update an Upstream
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-upstreams.createorupdateupstream
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-apisix-patch-upstream
      description: Apache APISIX Patch an Upstream
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-upstreams.patchupstream
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-apisix-delete-upstream
      description: Apache APISIX Delete an Upstream
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: admin-upstreams.deleteupstream
      outputParameters:
      - type: object
        mapping: $.