Optimizely · Capability

Optimizely Feature Experimentation REST API — Environments

Optimizely Feature Experimentation REST API — Environments. 4 operations. Lead operation: List environments. Self-contained Naftiko capability covering one Optimizely business surface.

Run with Naftiko OptimizelyEnvironments

What You Can Do

GET
Listenvironments — List environments
/v1/environments
POST
Createenvironment — Create an environment
/v1/environments
GET
Getenvironment — Get an environment
/v1/environments/{environment-id}
PATCH
Updateenvironment — Update an environment
/v1/environments/{environment-id}

MCP Tools

list-environments

List environments

read-only idempotent
create-environment

Create an environment

get-environment

Get an environment

read-only idempotent
update-environment

Update an environment

idempotent

Capability Spec

feature-experimentation-environments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Optimizely Feature Experimentation REST API — Environments
  description: 'Optimizely Feature Experimentation REST API — Environments. 4 operations. Lead operation: List environments.
    Self-contained Naftiko capability covering one Optimizely business surface.'
  tags:
  - Optimizely
  - Environments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPTIMIZELY_API_KEY: OPTIMIZELY_API_KEY
capability:
  consumes:
  - type: http
    namespace: feature-experimentation-environments
    baseUri: https://api.optimizely.com/v2
    description: Optimizely Feature Experimentation REST 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: createenvironment
        method: POST
        description: Create 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-environment_id
      path: /environments/{environment_id}
      operations:
      - name: getenvironment
        method: GET
        description: Get an environment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateenvironment
        method: PATCH
        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: bearer
      token: '{{env.OPTIMIZELY_API_KEY}}'
  exposes:
  - type: rest
    namespace: feature-experimentation-environments-rest
    port: 8080
    description: REST adapter for Optimizely Feature Experimentation REST 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: feature-experimentation-environments.listenvironments
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createenvironment
        description: Create an environment
        call: feature-experimentation-environments.createenvironment
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/environments/{environment-id}
      name: environments-environment-id
      description: REST surface for environments-environment_id.
      operations:
      - method: GET
        name: getenvironment
        description: Get an environment
        call: feature-experimentation-environments.getenvironment
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateenvironment
        description: Update an environment
        call: feature-experimentation-environments.updateenvironment
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: feature-experimentation-environments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Optimizely Feature Experimentation REST 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: feature-experimentation-environments.listenvironments
      outputParameters:
      - type: object
        mapping: $.
    - name: create-environment
      description: Create an environment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: feature-experimentation-environments.createenvironment
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-environment
      description: Get an environment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: feature-experimentation-environments.getenvironment
      outputParameters:
      - type: object
        mapping: $.
    - name: update-environment
      description: Update an environment
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: feature-experimentation-environments.updateenvironment
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.