naftiko: 1.0.0-alpha2 info: label: Optimizely Web Experimentation REST API — Audiences description: 'Optimizely Web Experimentation REST API — Audiences. 4 operations. Lead operation: List audiences. Self-contained Naftiko capability covering one Optimizely business surface.' tags: - Optimizely - Audiences created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: OPTIMIZELY_API_KEY: OPTIMIZELY_API_KEY capability: consumes: - type: http namespace: web-experimentation-audiences baseUri: https://api.optimizely.com/v2 description: Optimizely Web Experimentation REST API — Audiences business capability. Self-contained, no shared references. resources: - name: audiences path: /audiences operations: - name: listaudiences method: GET description: List audiences outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createaudience method: POST description: Create an audience outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: audiences-audience_id path: /audiences/{audience_id} operations: - name: getaudience method: GET description: Get an audience outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updateaudience method: PATCH description: Update an audience 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: web-experimentation-audiences-rest port: 8080 description: REST adapter for Optimizely Web Experimentation REST API — Audiences. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/audiences name: audiences description: REST surface for audiences. operations: - method: GET name: listaudiences description: List audiences call: web-experimentation-audiences.listaudiences outputParameters: - type: object mapping: $. - method: POST name: createaudience description: Create an audience call: web-experimentation-audiences.createaudience with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/audiences/{audience-id} name: audiences-audience-id description: REST surface for audiences-audience_id. operations: - method: GET name: getaudience description: Get an audience call: web-experimentation-audiences.getaudience outputParameters: - type: object mapping: $. - method: PATCH name: updateaudience description: Update an audience call: web-experimentation-audiences.updateaudience with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: web-experimentation-audiences-mcp port: 9090 transport: http description: MCP adapter for Optimizely Web Experimentation REST API — Audiences. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-audiences description: List audiences hints: readOnly: true destructive: false idempotent: true call: web-experimentation-audiences.listaudiences outputParameters: - type: object mapping: $. - name: create-audience description: Create an audience hints: readOnly: false destructive: false idempotent: false call: web-experimentation-audiences.createaudience with: body: tools.body outputParameters: - type: object mapping: $. - name: get-audience description: Get an audience hints: readOnly: true destructive: false idempotent: true call: web-experimentation-audiences.getaudience outputParameters: - type: object mapping: $. - name: update-audience description: Update an audience hints: readOnly: false destructive: false idempotent: true call: web-experimentation-audiences.updateaudience with: body: tools.body outputParameters: - type: object mapping: $.