Couchbase · Capability

Couchbase Sync Gateway Public REST API — Authentication

Couchbase Sync Gateway Public REST API — Authentication. 2 operations. Lead operation: Create a user session. Self-contained Naftiko capability covering one Couchbase business surface.

Run with Naftiko CouchbaseAuthentication

What You Can Do

POST
Createsession — Create a user session
/v1/{db}/session
DELETE
Deletesession — Delete current session
/v1/{db}/session

MCP Tools

create-user-session

Create a user session

delete-current-session

Delete current session

idempotent

Capability Spec

sync-gateway-public-rest-authentication.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Couchbase Sync Gateway Public REST API — Authentication
  description: 'Couchbase Sync Gateway Public REST API — Authentication. 2 operations. Lead operation: Create a user session.
    Self-contained Naftiko capability covering one Couchbase business surface.'
  tags:
  - Couchbase
  - Authentication
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COUCHBASE_API_KEY: COUCHBASE_API_KEY
capability:
  consumes:
  - type: http
    namespace: sync-gateway-public-rest-authentication
    baseUri: https://localhost:4984
    description: Couchbase Sync Gateway Public REST API — Authentication business capability. Self-contained, no shared references.
    resources:
    - name: db-_session
      path: /{db}/_session
      operations:
      - name: createsession
        method: POST
        description: Create a user session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletesession
        method: DELETE
        description: Delete current session
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: SyncGatewaySession
      value: '{{env.COUCHBASE_API_KEY}}'
      placement: cookie
  exposes:
  - type: rest
    namespace: sync-gateway-public-rest-authentication-rest
    port: 8080
    description: REST adapter for Couchbase Sync Gateway Public REST API — Authentication. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/{db}/session
      name: db-session
      description: REST surface for db-_session.
      operations:
      - method: POST
        name: createsession
        description: Create a user session
        call: sync-gateway-public-rest-authentication.createsession
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletesession
        description: Delete current session
        call: sync-gateway-public-rest-authentication.deletesession
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: sync-gateway-public-rest-authentication-mcp
    port: 9090
    transport: http
    description: MCP adapter for Couchbase Sync Gateway Public REST API — Authentication. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: create-user-session
      description: Create a user session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: sync-gateway-public-rest-authentication.createsession
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-current-session
      description: Delete current session
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: sync-gateway-public-rest-authentication.deletesession
      outputParameters:
      - type: object
        mapping: $.