Couchbase Replication API

Endpoints for managing inter-Sync Gateway replications.

Operations 5

GET /{db}/_replication/ List replications #
POST /{db}/_replication/ Create a replication #
GET /{db}/_replication/{replicationId} Get replication details #
PUT /{db}/_replication/{replicationId} Update a replication #
DELETE /{db}/_replication/{replicationId} Delete a replication #

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-replication-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-replication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Couchbase Sync Gateway Admin REST Replication API
  description: The Couchbase Sync Gateway Admin REST API provides administrative endpoints for configuring and managing Sync Gateway instances. It supports database management, user and role administration, sync function configuration, and replication setup. The API is intended for server-side administration and is typically bound to localhost for security, enabling full control over Sync Gateway behavior, access control policies, and data synchronization rules.
  version: '3.1'
  contact:
    name: Couchbase Support
    url: https://support.couchbase.com
  termsOfService: https://www.couchbase.com/terms-of-use
servers:
- url: https://localhost:4985
  description: Sync Gateway Admin REST API (default port)
security:
- basicAuth: []
tags:
- name: Replication
  description: Endpoints for configuring inter-Sync Gateway replications.
paths:
  /{db}/_replication/:
    get:
      operationId: listReplications
      summary: List replications
      description: Returns all configured inter-Sync Gateway replications.
      tags:
      - Replication
      parameters:
      - $ref: '#/components/parameters/db'
      responses:
        '200':
          description: Successful retrieval of replications
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReplicationConfig'
        '401':
          description: Unauthorized access
    post:
      operationId: createReplication
      summary: Create a replication
      description: Creates a new inter-Sync Gateway replication.
      tags:
      - Replication
      parameters:
      - $ref: '#/components/parameters/db'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplicationConfig'
      responses:
        '201':
          description: Replication created successfully
        '400':
          description: Invalid replication configuration
        '401':
          description: Unauthorized access
  /{db}/_replication/{replicationId}:
    get:
      operationId: getReplication
      summary: Get replication details
      description: Returns the configuration and status of a specific replication.
      tags:
      - Replication
      parameters:
      - $ref: '#/components/parameters/db'
      - $ref: '#/components/parameters/replicationId'
      responses:
        '200':
          description: Successful retrieval of replication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplicationConfig'
        '401':
          description: Unauthorized access
        '404':
          description: Replication not found
    put:
      operationId: updateReplication
      summary: Update a replication
      description: Updates the configuration of an existing replication.
      tags:
      - Replication
      parameters:
      - $ref: '#/components/parameters/db'
      - $ref: '#/components/parameters/replicationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplicationConfig'
      responses:
        '200':
          description: Replication updated successfully
        '401':
          description: Unauthorized access
        '404':
          description: Replication not found
    delete:
      operationId: deleteReplication
      summary: Delete a replication
      description: Deletes the specified replication.
      tags:
      - Replication
      parameters:
      - $ref: '#/components/parameters/db'
      - $ref: '#/components/parameters/replicationId'
      responses:
        '200':
          description: Replication deleted successfully
        '401':
          description: Unauthorized access
        '404':
          description: Replication not found
components:
  schemas:
    ReplicationConfig:
      type: object
      description: Inter-Sync Gateway replication
      properties:
        replication_id:
          type: string
          description: Replication identifier
        remote:
          type: string
          description: URL of the remote Sync Gateway
        direction:
          type: string
          enum:
          - push
          - pull
          - pushAndPull
        continuous:
          type: boolean
          description: Whether the replication runs continuously
        filter:
          type: string
          description: Filter function
        query_params:
          type: object
          properties:
            channels:
              type: array
              items:
                type: string
        conflict_resolution_type:
          type: string
          enum:
          - default
          - localWins
          - remoteWins
          - custom
        custom_conflict_resolver:
          type: string
          description: Custom conflict resolver function
        initial_state:
          type: string
          enum:
          - running
          - stopped
        state:
          type: string
          enum:
          - running
          - stopped
          - error
          - reconnecting
  parameters:
    db:
      name: db
      in: path
      required: true
      description: The database name
      schema:
        type: string
    replicationId:
      name: replicationId
      in: path
      required: true
      description: The replication identifier
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication with admin credentials or RBAC user with appropriate roles.
externalDocs:
  description: Couchbase Sync Gateway Admin REST API Documentation
  url: https://docs.couchbase.com/sync-gateway/current/rest-api-admin.html