flagsmith · Capability

Flagsmith Admin API — Environments

Flagsmith Admin API — Environments. 3 operations. Lead operation: List environments. Self-contained Naftiko capability covering one Flagsmith business surface.

Run with Naftiko FlagsmithEnvironments

What You Can Do

GET
Listenvironments — List environments
/v1/environments
GET
Getenvironment — Get an environment
/v1/environments/{environment-api-key}
PUT
Updateenvironment — Update an environment
/v1/environments/{environment-api-key}

MCP Tools

list-environments

List environments

read-only idempotent
get-environment

Get an environment

read-only idempotent
update-environment

Update an environment

idempotent

Capability Spec

admin-environments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Flagsmith Admin API — Environments
  description: 'Flagsmith Admin API — Environments. 3 operations. Lead operation: List environments. Self-contained Naftiko
    capability covering one Flagsmith business surface.'
  tags:
  - Flagsmith
  - Environments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FLAGSMITH_API_KEY: FLAGSMITH_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-environments
    baseUri: https://api.flagsmith.com/api/v1
    description: Flagsmith Admin API — Environments business capability. Self-contained, no shared references.
    resources:
    - name: environments
      path: /environments/
      operations:
      - name: listenvironments
        method: GET
        description: List environments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: environments-environment_api_key
      path: /environments/{environment_api_key}/
      operations:
      - name: getenvironment
        method: GET
        description: Get an environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateenvironment
        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
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.FLAGSMITH_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: admin-environments-rest
    port: 8080
    description: REST adapter for Flagsmith Admin API — 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: listenvironments
        description: List environments
        call: admin-environments.listenvironments
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/environments/{environment-api-key}
      name: environments-environment-api-key
      description: REST surface for environments-environment_api_key.
      operations:
      - method: GET
        name: getenvironment
        description: Get an environment
        call: admin-environments.getenvironment
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateenvironment
        description: Update an environment
        call: admin-environments.updateenvironment
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-environments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Flagsmith Admin API — Environments. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-environments
      description: List environments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-environments.listenvironments
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment
      description: Get an environment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-environments.getenvironment
      outputParameters:
      - type: object
        mapping: $.
    - name: update-environment
      description: Update an environment
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-environments.updateenvironment
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.