Couchbase Role Management API

Endpoints for managing roles and their channel assignments.

Operations 5

GET /{db}/_role/ List all roles #
POST /{db}/_role/ Create a role #
GET /{db}/_role/{roleName} Get role details #
PUT /{db}/_role/{roleName} Update a role #
DELETE /{db}/_role/{roleName} Delete a role #

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-role-management-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-role-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Couchbase Sync Gateway Admin REST Role Management 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: Role Management
  description: Endpoints for managing roles and their channel assignments.
paths:
  /{db}/_role/:
    get:
      operationId: listRoles
      summary: List all roles
      description: Returns the list of all roles configured for the database.
      tags:
      - Role Management
      parameters:
      - $ref: '#/components/parameters/db'
      responses:
        '200':
          description: Successful retrieval of role list
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '401':
          description: Unauthorized access
    post:
      operationId: createRole
      summary: Create a role
      description: Creates a new role with the specified channel assignments.
      tags:
      - Role Management
      parameters:
      - $ref: '#/components/parameters/db'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleConfig'
      responses:
        '201':
          description: Role created successfully
        '400':
          description: Invalid role configuration
        '401':
          description: Unauthorized access
        '409':
          description: Role already exists
  /{db}/_role/{roleName}:
    get:
      operationId: getRole
      summary: Get role details
      description: Returns detailed information about a specific role.
      tags:
      - Role Management
      parameters:
      - $ref: '#/components/parameters/db'
      - $ref: '#/components/parameters/roleName'
      responses:
        '200':
          description: Successful retrieval of role details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleInfo'
        '401':
          description: Unauthorized access
        '404':
          description: Role not found
    put:
      operationId: updateRole
      summary: Update a role
      description: Updates a role's channel assignments.
      tags:
      - Role Management
      parameters:
      - $ref: '#/components/parameters/db'
      - $ref: '#/components/parameters/roleName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleConfig'
      responses:
        '200':
          description: Role updated successfully
        '401':
          description: Unauthorized access
        '404':
          description: Role not found
    delete:
      operationId: deleteRole
      summary: Delete a role
      description: Deletes the specified role.
      tags:
      - Role Management
      parameters:
      - $ref: '#/components/parameters/db'
      - $ref: '#/components/parameters/roleName'
      responses:
        '200':
          description: Role deleted successfully
        '401':
          description: Unauthorized access
        '404':
          description: Role not found
components:
  schemas:
    RoleConfig:
      type: object
      description: Role configuration
      required:
      - name
      properties:
        name:
          type: string
          description: Role name
        admin_channels:
          type: array
          description: Admin-assigned channels
          items:
            type: string
    RoleInfo:
      type: object
      description: Role information
      properties:
        name:
          type: string
        admin_channels:
          type: array
          items:
            type: string
        all_channels:
          type: array
          items:
            type: string
  parameters:
    roleName:
      name: roleName
      in: path
      required: true
      description: The role name
      schema:
        type: string
    db:
      name: db
      in: path
      required: true
      description: The database name
      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