naftiko: 1.0.0-alpha2 info: label: Couchbase Capella App Services Public API — Documents description: 'Couchbase Capella App Services Public API — Documents. 6 operations. Lead operation: Get all documents. Self-contained Naftiko capability covering one Couchbase business surface.' tags: - Couchbase - Documents created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: COUCHBASE_API_KEY: COUCHBASE_API_KEY capability: consumes: - type: http namespace: capella-app-services-public-documents baseUri: https://{appEndpoint} description: Couchbase Capella App Services Public API — Documents business capability. Self-contained, no shared references. resources: - name: db-_all_docs path: /{db}/_all_docs operations: - name: getalldocs method: GET description: Get all documents outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: include_docs in: query type: boolean description: Whether to include document bodies in the response - name: channels in: query type: string description: Filter results by channel name - name: keys in: query type: string description: Array of document IDs to retrieve - name: startkey in: query type: string description: Start key for the range to return - name: endkey in: query type: string description: End key for the range to return - name: limit in: query type: integer description: Maximum number of results to return - name: db-_bulk_docs path: /{db}/_bulk_docs operations: - name: bulkdocs method: POST description: Create or update multiple documents outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: db-_bulk_get path: /{db}/_bulk_get operations: - name: bulkget method: POST description: Get multiple documents outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: attachments in: query type: boolean description: Whether to include attachments - name: revs in: query type: boolean description: Whether to include revision history - name: body in: body type: object description: Request body (JSON). required: true - name: db-docId path: /{db}/{docId} operations: - name: getdocument method: GET description: Get a document outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: rev in: query type: string description: Specific revision to retrieve - name: revs in: query type: boolean description: Whether to include revision history - name: open_revs in: query type: string description: Array of revision IDs or "all" to get all leaf revisions - name: attachments in: query type: boolean description: Whether to include attachment data - name: putdocument method: PUT description: Create or update a document outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: rev in: query type: string description: Current revision for updates - name: body in: body type: object description: Request body (JSON). required: true - name: deletedocument method: DELETE description: Delete a document outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: rev in: query type: string description: Current revision of the document required: true authentication: type: apikey key: SyncGatewaySession value: '{{env.COUCHBASE_API_KEY}}' placement: cookie exposes: - type: rest namespace: capella-app-services-public-documents-rest port: 8080 description: REST adapter for Couchbase Capella App Services Public API — Documents. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/{db}/all-docs name: db-all-docs description: REST surface for db-_all_docs. operations: - method: GET name: getalldocs description: Get all documents call: capella-app-services-public-documents.getalldocs with: include_docs: rest.include_docs channels: rest.channels keys: rest.keys startkey: rest.startkey endkey: rest.endkey limit: rest.limit outputParameters: - type: object mapping: $. - path: /v1/{db}/bulk-docs name: db-bulk-docs description: REST surface for db-_bulk_docs. operations: - method: POST name: bulkdocs description: Create or update multiple documents call: capella-app-services-public-documents.bulkdocs with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/{db}/bulk-get name: db-bulk-get description: REST surface for db-_bulk_get. operations: - method: POST name: bulkget description: Get multiple documents call: capella-app-services-public-documents.bulkget with: attachments: rest.attachments revs: rest.revs body: rest.body outputParameters: - type: object mapping: $. - path: /v1/{db}/{docid} name: db-docid description: REST surface for db-docId. operations: - method: GET name: getdocument description: Get a document call: capella-app-services-public-documents.getdocument with: rev: rest.rev revs: rest.revs open_revs: rest.open_revs attachments: rest.attachments outputParameters: - type: object mapping: $. - method: PUT name: putdocument description: Create or update a document call: capella-app-services-public-documents.putdocument with: rev: rest.rev body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletedocument description: Delete a document call: capella-app-services-public-documents.deletedocument with: rev: rest.rev outputParameters: - type: object mapping: $. - type: mcp namespace: capella-app-services-public-documents-mcp port: 9090 transport: http description: MCP adapter for Couchbase Capella App Services Public API — Documents. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-all-documents description: Get all documents hints: readOnly: true destructive: false idempotent: true call: capella-app-services-public-documents.getalldocs with: include_docs: tools.include_docs channels: tools.channels keys: tools.keys startkey: tools.startkey endkey: tools.endkey limit: tools.limit outputParameters: - type: object mapping: $. - name: create-update-multiple-documents description: Create or update multiple documents hints: readOnly: false destructive: false idempotent: false call: capella-app-services-public-documents.bulkdocs with: body: tools.body outputParameters: - type: object mapping: $. - name: get-multiple-documents description: Get multiple documents hints: readOnly: true destructive: false idempotent: false call: capella-app-services-public-documents.bulkget with: attachments: tools.attachments revs: tools.revs body: tools.body outputParameters: - type: object mapping: $. - name: get-document description: Get a document hints: readOnly: true destructive: false idempotent: true call: capella-app-services-public-documents.getdocument with: rev: tools.rev revs: tools.revs open_revs: tools.open_revs attachments: tools.attachments outputParameters: - type: object mapping: $. - name: create-update-document description: Create or update a document hints: readOnly: false destructive: false idempotent: true call: capella-app-services-public-documents.putdocument with: rev: tools.rev body: tools.body outputParameters: - type: object mapping: $. - name: delete-document description: Delete a document hints: readOnly: false destructive: true idempotent: true call: capella-app-services-public-documents.deletedocument with: rev: tools.rev outputParameters: - type: object mapping: $.