naftiko: 1.0.0-alpha2 info: label: Capital.com REST API — Session description: 'Capital.com REST API — Session. 5 operations. Lead operation: Get Session Details. Self-contained Naftiko capability covering one Capital Com Public Api business surface.' tags: - Capital Com Public Api - Session created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: CAPITAL_COM_PUBLIC_API_API_KEY: CAPITAL_COM_PUBLIC_API_API_KEY capability: consumes: - type: http namespace: capital-com-rest-session baseUri: https://api-capital.backend-capital.com description: Capital.com REST API — Session business capability. Self-contained, no shared references. resources: - name: api-v1-session path: /api/v1/session operations: - name: getsession method: GET description: Get Session Details outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createsession method: POST description: Create New Session outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: switchaccount method: PUT description: Switch Active Account outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: logoutsession method: DELETE description: Log Out Session outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-v1-session-encryptionKey path: /api/v1/session/encryptionKey operations: - name: getencryptionkey method: GET description: Get Encryption Key outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: apikey key: X-CAP-API-KEY value: '{{env.CAPITAL_COM_PUBLIC_API_API_KEY}}' placement: header exposes: - type: rest namespace: capital-com-rest-session-rest port: 8080 description: REST adapter for Capital.com REST API — Session. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v1/session name: api-v1-session description: REST surface for api-v1-session. operations: - method: GET name: getsession description: Get Session Details call: capital-com-rest-session.getsession outputParameters: - type: object mapping: $. - method: POST name: createsession description: Create New Session call: capital-com-rest-session.createsession with: body: rest.body outputParameters: - type: object mapping: $. - method: PUT name: switchaccount description: Switch Active Account call: capital-com-rest-session.switchaccount with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: logoutsession description: Log Out Session call: capital-com-rest-session.logoutsession outputParameters: - type: object mapping: $. - path: /v1/api/v1/session/encryptionkey name: api-v1-session-encryptionkey description: REST surface for api-v1-session-encryptionKey. operations: - method: GET name: getencryptionkey description: Get Encryption Key call: capital-com-rest-session.getencryptionkey outputParameters: - type: object mapping: $. - type: mcp namespace: capital-com-rest-session-mcp port: 9090 transport: http description: MCP adapter for Capital.com REST API — Session. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-session-details description: Get Session Details hints: readOnly: true destructive: false idempotent: true call: capital-com-rest-session.getsession outputParameters: - type: object mapping: $. - name: create-new-session description: Create New Session hints: readOnly: false destructive: false idempotent: false call: capital-com-rest-session.createsession with: body: tools.body outputParameters: - type: object mapping: $. - name: switch-active-account description: Switch Active Account hints: readOnly: false destructive: false idempotent: true call: capital-com-rest-session.switchaccount with: body: tools.body outputParameters: - type: object mapping: $. - name: log-out-session description: Log Out Session hints: readOnly: false destructive: true idempotent: true call: capital-com-rest-session.logoutsession outputParameters: - type: object mapping: $. - name: get-encryption-key description: Get Encryption Key hints: readOnly: true destructive: false idempotent: true call: capital-com-rest-session.getencryptionkey outputParameters: - type: object mapping: $.