Couchbase Local Documents API

Endpoints for managing local documents used by replication checkpoints.

Operations 3

GET /{db}/_local/{localDocId} Get a local document #
PUT /{db}/_local/{localDocId} Create or update a local document #
DELETE /{db}/_local/{localDocId} Delete a local document #

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-local-documents-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-local-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Couchbase Sync Gateway Public REST Local Documents API
  description: The Couchbase Sync Gateway Public REST API provides endpoints for mobile and edge clients to synchronize data with Couchbase Server through the Sync Gateway middleware. It supports document CRUD operations, changes feeds for real-time data synchronization, and user authentication. The API enables offline-first mobile applications to replicate data bidirectionally between Couchbase Lite embedded databases and Couchbase Server clusters.
  version: '3.1'
  contact:
    name: Couchbase Support
    url: https://support.couchbase.com
  termsOfService: https://www.couchbase.com/terms-of-use
servers:
- url: https://localhost:4984
  description: Sync Gateway Public REST API (default port)
security:
- basicAuth: []
- sessionAuth: []
tags:
- name: Local Documents
  description: Endpoints for managing local documents used by replication checkpoints.
paths:
  /{db}/_local/{localDocId}:
    get:
      operationId: getLocalDocument
      summary: Get a local document
      description: Retrieves a local document. Local documents are not replicated and are used internally for replication checkpoints.
      tags:
      - Local Documents
      parameters:
      - $ref: '#/components/parameters/db'
      - name: localDocId
        in: path
        required: true
        description: Local document ID
        schema:
          type: string
      responses:
        '200':
          description: Successful retrieval of local document
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Unauthorized access
        '404':
          description: Local document not found
    put:
      operationId: putLocalDocument
      summary: Create or update a local document
      description: Creates or updates a local document. Local documents are not replicated and are used for replication checkpoints.
      tags:
      - Local Documents
      parameters:
      - $ref: '#/components/parameters/db'
      - name: localDocId
        in: path
        required: true
        description: Local document ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Local document saved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentWriteResponse'
        '401':
          description: Unauthorized access
        '409':
          description: Conflict
    delete:
      operationId: deleteLocalDocument
      summary: Delete a local document
      description: Deletes a local document.
      tags:
      - Local Documents
      parameters:
      - $ref: '#/components/parameters/db'
      - name: localDocId
        in: path
        required: true
        description: Local document ID
        schema:
          type: string
      - name: rev
        in: query
        required: true
        description: Current revision of the local document
        schema:
          type: string
      responses:
        '200':
          description: Local document deleted successfully
        '401':
          description: Unauthorized access
        '404':
          description: Local document not found
components:
  parameters:
    db:
      name: db
      in: path
      required: true
      description: The database name
      schema:
        type: string
  schemas:
    DocumentWriteResponse:
      type: object
      description: Response from a document write operation
      properties:
        id:
          type: string
          description: Document ID
        rev:
          type: string
          description: New revision ID
        ok:
          type: boolean
          description: Whether the operation succeeded
  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 from the _session endpoint.
externalDocs:
  description: Couchbase Sync Gateway Public REST API Documentation
  url: https://docs.couchbase.com/sync-gateway/current/rest-api.html