Couchbase Changes API

Endpoints for monitoring document changes and subscribing to change feeds.

Operations 2

GET /{db}/_changes Get changes feed #
POST /{db}/_changes Get changes feed via POST #

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-changes-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-changes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Couchbase Changes API
  contact:
    name: Couchbase Support
    url: https://support.couchbase.com
  termsOfService: https://www.couchbase.com/terms-of-use
  version: '1.0'
  description: 'Operations tagged Changes 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: Changes
  description: Endpoints for monitoring document changes and subscribing to change feeds.
paths:
  /{db}/_changes:
    get:
      operationId: getChanges
      summary: Get changes feed
      description: Returns a list of changes made to documents in the database in sequence order. Supports long-polling, continuous, and one-shot modes for real-time synchronization.
      tags:
      - Changes
      parameters:
      - $ref: '#/components/parameters/db'
      - name: since
        in: query
        required: false
        description: Sequence number to start from
        schema:
          type: string
      - name: feed
        in: query
        required: false
        description: Type of changes feed
        schema:
          type: string
          enum:
          - normal
          - longpoll
          - continuous
          - websocket
      - name: filter
        in: query
        required: false
        description: Filter function to apply
        schema:
          type: string
          enum:
          - sync_gateway/bychannel
      - name: channels
        in: query
        required: false
        description: Comma-separated list of channel names to filter by
        schema:
          type: string
      - name: include_docs
        in: query
        required: false
        description: Whether to include document bodies
        schema:
          type: boolean
      - name: limit
        in: query
        required: false
        description: Maximum number of changes to return
        schema:
          type: integer
      - name: heartbeat
        in: query
        required: false
        description: Heartbeat interval in milliseconds for continuous feed
        schema:
          type: integer
      - name: timeout
        in: query
        required: false
        description: Timeout in milliseconds for longpoll feed
        schema:
          type: integer
      - name: style
        in: query
        required: false
        description: Whether to return all leaf revisions
        schema:
          type: string
          enum:
          - main_only
          - all_docs
      - name: active_only
        in: query
        required: false
        description: Whether to exclude deleted documents
        schema:
          type: boolean
      responses:
        '200':
          description: Successful retrieval of changes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangesResponse'
        '401':
          description: Unauthorized access
    post:
      operationId: postChanges
      summary: Get changes feed via POST
      description: Returns changes feed with parameters specified in the request body. Identical to the GET endpoint but allows for complex filter parameters.
      tags:
      - Changes
      parameters:
      - $ref: '#/components/parameters/db'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                since:
                  type: string
                  description: Sequence number to start from
                filter:
                  type: string
                  description: Filter function name
                channels:
                  type: string
                  description: Channel names to filter by
                include_docs:
                  type: boolean
                  description: Whether to include document bodies
                limit:
                  type: integer
                  description: Maximum number of changes
                feed:
                  type: string
                  enum:
                  - normal
                  - longpoll
                  - continuous
                active_only:
                  type: boolean
                  description: Exclude deleted documents
      responses:
        '200':
          description: Successful retrieval of changes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangesResponse'
        '401':
          description: Unauthorized access
    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:
    ChangesResponse:
      type: object
      description: Changes feed response
      properties:
        results:
          type: array
          description: Array of changes
          items:
            type: object
            properties:
              seq:
                description: Sequence number
              id:
                type: string
                description: Document ID
              changes:
                type: array
                description: List of revision changes
                items:
                  type: object
                  properties:
                    rev:
                      type: string
                      description: Revision ID
              deleted:
                type: boolean
                description: Whether the document was deleted
              doc:
                type: object
                description: Document body (if include_docs=true)
        last_seq:
          description: Last sequence number in the response
        pending:
          type: integer
          description: Number of pending changes
    ChangesResponse_2:
      type: object
      description: Changes feed response
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              seq:
                description: Sequence identifier
              id:
                type: string
                description: Document ID
              changes:
                type: array
                items:
                  type: object
                  properties:
                    rev:
                      type: string
              deleted:
                type: boolean
              doc:
                type: object
        last_seq:
          description: Last sequence in the response
        pending:
          type: integer
          description: Number of pending changes
  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