Couchbase Authentication API

Endpoints for user authentication and session management.

Operations 4

POST /{db}/_session Create a user session #
DELETE /{db}/_session Delete current session #
GET /{db}/_oidc Initiate OpenID Connect authentication #
GET /{db}/_oidc_callback OpenID Connect callback #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/couchbase-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

couchbase-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Couchbase Authentication API
  contact:
    name: Couchbase Support
    url: https://support.couchbase.com
  termsOfService: https://www.couchbase.com/terms-of-use
  version: '1.0'
  description: 'Operations tagged Authentication across 2 of this provider''s published API definitions: couchbase-capella-app-services-public-api-openapi.yml, couchbase-sync-gateway-public-rest-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{appEndpoint}
  description: Capella App Services endpoint
  variables:
    appEndpoint:
      default: example.apps.cloud.couchbase.com
      description: The App Services endpoint URL
- url: https://localhost:4984
  description: Sync Gateway Public REST API (default port)
security:
- basicAuth: []
- sessionAuth: []
tags:
- name: Authentication
  description: Endpoints for user authentication and session management.
paths:
  /{db}/_session:
    post:
      operationId: createSession
      summary: Create a user session
      description: Authenticates a user and creates a new session. Returns a session cookie that can be used for subsequent requests.
      tags:
      - Authentication
      parameters:
      - $ref: '#/components/parameters/db'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - password
              properties:
                name:
                  type: string
                  description: Username
                password:
                  type: string
                  description: User password
      responses:
        '200':
          description: Session created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Invalid credentials
    delete:
      operationId: deleteSession
      summary: Delete current session
      description: Invalidates the current user session.
      tags:
      - Authentication
      parameters:
      - $ref: '#/components/parameters/db'
      responses:
        '200':
          description: Session deleted successfully
        '401':
          description: No active session
    servers:
    - url: https://{appEndpoint}
      description: Capella App Services endpoint
      variables:
        appEndpoint:
          default: example.apps.cloud.couchbase.com
          description: The App Services endpoint URL
  /{db}/_oidc:
    get:
      operationId: oidcAuthenticate
      summary: Initiate OpenID Connect authentication
      description: Initiates the OpenID Connect authentication flow by redirecting the user to the configured identity provider.
      tags:
      - Authentication
      parameters:
      - $ref: '#/components/parameters/db'
      - name: provider
        in: query
        required: false
        description: Name of the OIDC provider
        schema:
          type: string
      - name: offline
        in: query
        required: false
        description: Whether to request a refresh token
        schema:
          type: boolean
      responses:
        '302':
          description: Redirect to identity provider
        '500':
          description: OIDC not configured
    servers:
    - url: https://{appEndpoint}
      description: Capella App Services endpoint
      variables:
        appEndpoint:
          default: example.apps.cloud.couchbase.com
          description: The App Services endpoint URL
  /{db}/_oidc_callback:
    get:
      operationId: oidcCallback
      summary: OpenID Connect callback
      description: Handles the callback from the identity provider after user authentication and creates a Sync Gateway session.
      tags:
      - Authentication
      parameters:
      - $ref: '#/components/parameters/db'
      - name: code
        in: query
        required: true
        description: Authorization code from the identity provider
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: State parameter for CSRF protection
        schema:
          type: string
      responses:
        '200':
          description: Authentication successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Authentication failed
    servers:
    - url: https://{appEndpoint}
      description: Capella App Services endpoint
      variables:
        appEndpoint:
          default: example.apps.cloud.couchbase.com
          description: The App Services endpoint URL
components:
  parameters:
    db:
      name: db
      in: path
      required: true
      description: The name of the database (keyspace)
      schema:
        type: string
    db_2:
      name: db
      in: path
      required: true
      description: The database name
      schema:
        type: string
  schemas:
    SessionResponse:
      type: object
      description: Session creation response
      properties:
        session_id:
          type: string
          description: Session identifier
        expires:
          type: string
          format: date-time
          description: Session expiration time
        cookie_name:
          type: string
          description: Name of the session cookie
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication using Sync Gateway user credentials.
    sessionAuth:
      type: apiKey
      in: cookie
      name: SyncGatewaySession
      description: Session cookie authentication obtained from the _session endpoint.
x-refined-from:
- couchbase-capella-app-services-public-api-openapi.yml
- couchbase-sync-gateway-public-rest-api-openapi.yml