WSO2 · Capability

WSO2 API Manager - Admin — Environments

WSO2 API Manager - Admin — Environments. 6 operations. Lead operation: Get all registered Environments. Self-contained Naftiko capability covering one Wso2 business surface.

Run with Naftiko Wso2Environments

What You Can Do

GET
Get — Get all registered Environments
/v1/environments
POST
Post — Add an Environment
/v1/environments
GET
Get — Get a Gateway Environment Configuration
/v1/environments/{environmentid}
PUT
Put — Update an Environment
/v1/environments/{environmentid}
DELETE
Delete — Delete an Environment
/v1/environments/{environmentid}
GET
Get — Get Gateway Instances in a Gateway Environment
/v1/environments/{environmentid}/gateways

MCP Tools

get-all-registered-environments

Get all registered Environments

read-only idempotent
add-environment

Add an Environment

get-gateway-environment-configuration

Get a Gateway Environment Configuration

read-only idempotent
update-environment

Update an Environment

idempotent
delete-environment

Delete an Environment

idempotent
get-gateway-instances-gateway-environment

Get Gateway Instances in a Gateway Environment

read-only idempotent

Capability Spec

admin-environments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: WSO2 API Manager - Admin — Environments
  description: 'WSO2 API Manager - Admin — Environments. 6 operations. Lead operation: Get all registered Environments. Self-contained
    Naftiko capability covering one Wso2 business surface.'
  tags:
  - Wso2
  - Environments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    WSO2_API_KEY: WSO2_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-environments
    baseUri: https://apis.wso2.com/api/am/admin/v4
    description: WSO2 API Manager - Admin — Environments business capability. Self-contained, no shared references.
    resources:
    - name: environments
      path: /environments
      operations:
      - name: get
        method: GET
        description: Get all registered Environments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Add an Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: environments-environmentId
      path: /environments/{environmentId}
      operations:
      - name: get
        method: GET
        description: Get a Gateway Environment Configuration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: put
        method: PUT
        description: Update an Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: delete
        method: DELETE
        description: Delete an Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: environments-environmentId-gateways
      path: /environments/{environmentId}/gateways
      operations:
      - name: get
        method: GET
        description: Get Gateway Instances in a Gateway Environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.WSO2_API_KEY}}'
  exposes:
  - type: rest
    namespace: admin-environments-rest
    port: 8080
    description: REST adapter for WSO2 API Manager - Admin — Environments. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/environments
      name: environments
      description: REST surface for environments.
      operations:
      - method: GET
        name: get
        description: Get all registered Environments
        call: admin-environments.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Add an Environment
        call: admin-environments.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/environments/{environmentid}
      name: environments-environmentid
      description: REST surface for environments-environmentId.
      operations:
      - method: GET
        name: get
        description: Get a Gateway Environment Configuration
        call: admin-environments.get
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Update an Environment
        call: admin-environments.put
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete an Environment
        call: admin-environments.delete
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/environments/{environmentid}/gateways
      name: environments-environmentid-gateways
      description: REST surface for environments-environmentId-gateways.
      operations:
      - method: GET
        name: get
        description: Get Gateway Instances in a Gateway Environment
        call: admin-environments.get
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-environments-mcp
    port: 9090
    transport: http
    description: MCP adapter for WSO2 API Manager - Admin — Environments. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-all-registered-environments
      description: Get all registered Environments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-environments.get
      outputParameters:
      - type: object
        mapping: $.
    - name: add-environment
      description: Add an Environment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: admin-environments.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-gateway-environment-configuration
      description: Get a Gateway Environment Configuration
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-environments.get
      outputParameters:
      - type: object
        mapping: $.
    - name: update-environment
      description: Update an Environment
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-environments.put
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-environment
      description: Delete an Environment
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: admin-environments.delete
      outputParameters:
      - type: object
        mapping: $.
    - name: get-gateway-instances-gateway-environment
      description: Get Gateway Instances in a Gateway Environment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-environments.get
      outputParameters:
      - type: object
        mapping: $.