naftiko: 1.0.0-alpha2 info: label: Optimizely Feature Experimentation REST API — Rulesets description: 'Optimizely Feature Experimentation REST API — Rulesets. 4 operations. Lead operation: Get a ruleset. Self-contained Naftiko capability covering one Optimizely business surface.' tags: - Optimizely - Rulesets 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-rulesets baseUri: https://api.optimizely.com/v2 description: Optimizely Feature Experimentation REST API — Rulesets business capability. Self-contained, no shared references. resources: - name: projects-project_id-flags-flag_key-environments-environment_key-ruleset path: /projects/{project_id}/flags/{flag_key}/environments/{environment_key}/ruleset operations: - name: getruleset method: GET description: Get a ruleset outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updateruleset method: PATCH description: Update a ruleset outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: projects-project_id-flags-flag_key-environments-environment_key-ruleset-disabled path: /projects/{project_id}/flags/{flag_key}/environments/{environment_key}/ruleset/disabled operations: - name: disableruleset method: POST description: Disable a ruleset outputRawFormat: json outputParameters: - name: result type: object value: $. - name: projects-project_id-flags-flag_key-environments-environment_key-ruleset-enabled path: /projects/{project_id}/flags/{flag_key}/environments/{environment_key}/ruleset/enabled operations: - name: enableruleset method: POST description: Enable a ruleset outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: bearer token: '{{env.OPTIMIZELY_API_KEY}}' exposes: - type: rest namespace: feature-experimentation-rulesets-rest port: 8080 description: REST adapter for Optimizely Feature Experimentation REST API — Rulesets. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/projects/{project-id}/flags/{flag-key}/environments/{environment-key}/ruleset name: projects-project-id-flags-flag-key-environments-environment-key-ruleset description: REST surface for projects-project_id-flags-flag_key-environments-environment_key-ruleset. operations: - method: GET name: getruleset description: Get a ruleset call: feature-experimentation-rulesets.getruleset outputParameters: - type: object mapping: $. - method: PATCH name: updateruleset description: Update a ruleset call: feature-experimentation-rulesets.updateruleset with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/projects/{project-id}/flags/{flag-key}/environments/{environment-key}/ruleset/disabled name: projects-project-id-flags-flag-key-environments-environment-key-ruleset-disabled description: REST surface for projects-project_id-flags-flag_key-environments-environment_key-ruleset-disabled. operations: - method: POST name: disableruleset description: Disable a ruleset call: feature-experimentation-rulesets.disableruleset outputParameters: - type: object mapping: $. - path: /v1/projects/{project-id}/flags/{flag-key}/environments/{environment-key}/ruleset/enabled name: projects-project-id-flags-flag-key-environments-environment-key-ruleset-enabled description: REST surface for projects-project_id-flags-flag_key-environments-environment_key-ruleset-enabled. operations: - method: POST name: enableruleset description: Enable a ruleset call: feature-experimentation-rulesets.enableruleset outputParameters: - type: object mapping: $. - type: mcp namespace: feature-experimentation-rulesets-mcp port: 9090 transport: http description: MCP adapter for Optimizely Feature Experimentation REST API — Rulesets. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-ruleset description: Get a ruleset hints: readOnly: true destructive: false idempotent: true call: feature-experimentation-rulesets.getruleset outputParameters: - type: object mapping: $. - name: update-ruleset description: Update a ruleset hints: readOnly: false destructive: false idempotent: true call: feature-experimentation-rulesets.updateruleset with: body: tools.body outputParameters: - type: object mapping: $. - name: disable-ruleset description: Disable a ruleset hints: readOnly: false destructive: false idempotent: false call: feature-experimentation-rulesets.disableruleset outputParameters: - type: object mapping: $. - name: enable-ruleset description: Enable a ruleset hints: readOnly: false destructive: false idempotent: false call: feature-experimentation-rulesets.enableruleset outputParameters: - type: object mapping: $.