Couchbase · Schema

Couchbase Document

Schema representing a Couchbase document with metadata fields used across Server, Sync Gateway, and Capella APIs.

AnalyticsApp ServicesBackupCapellaCloudDatabaseDatabase-as-a-ServiceEventingFull-Text SearchGatewayJSONMobileNoSQLReplicationSQL++SyncVector SearchXDCR

Properties

Name Type Description
_id string Unique document identifier within the bucket or collection
_rev string Revision identifier in Sync Gateway format (generation-digest)
_deleted boolean Indicates whether the document is a deletion tombstone
_exp integer Document expiration time as a Unix timestamp in seconds (0 means no expiry)
_attachments object Map of attachment names to attachment metadata
_sync object Sync Gateway metadata (internal, not typically user-facing)
View JSON Schema on GitHub

JSON Schema

couchbase-document-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://couchbase.com/schemas/couchbase/document.json",
  "title": "Couchbase Document",
  "description": "Schema representing a Couchbase document with metadata fields used across Server, Sync Gateway, and Capella APIs.",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "Unique document identifier within the bucket or collection"
    },
    "_rev": {
      "type": "string",
      "description": "Revision identifier in Sync Gateway format (generation-digest)",
      "pattern": "^\\d+-[a-f0-9]+$"
    },
    "_deleted": {
      "type": "boolean",
      "description": "Indicates whether the document is a deletion tombstone",
      "default": false
    },
    "_exp": {
      "type": "integer",
      "description": "Document expiration time as a Unix timestamp in seconds (0 means no expiry)",
      "minimum": 0
    },
    "_attachments": {
      "type": "object",
      "description": "Map of attachment names to attachment metadata",
      "additionalProperties": {
        "$ref": "#/$defs/Attachment"
      }
    },
    "_sync": {
      "type": "object",
      "description": "Sync Gateway metadata (internal, not typically user-facing)",
      "properties": {
        "rev": {
          "type": "string",
          "description": "Current revision"
        },
        "sequence": {
          "type": "integer",
          "description": "Sync sequence number"
        },
        "recent_sequences": {
          "type": "array",
          "description": "Recent sequence numbers",
          "items": {
            "type": "integer"
          }
        },
        "history": {
          "type": "object",
          "description": "Revision history"
        },
        "channels": {
          "type": "object",
          "description": "Channel assignments for this document"
        },
        "access": {
          "type": "object",
          "description": "User access grants from this document"
        },
        "role_access": {
          "type": "object",
          "description": "Role access grants from this document"
        }
      }
    }
  },
  "additionalProperties": true,
  "$defs": {
    "Attachment": {
      "type": "object",
      "description": "Document attachment metadata",
      "properties": {
        "content_type": {
          "type": "string",
          "description": "MIME type of the attachment"
        },
        "digest": {
          "type": "string",
          "description": "Content digest hash of the attachment"
        },
        "length": {
          "type": "integer",
          "description": "Size of the attachment in bytes",
          "minimum": 0
        },
        "revpos": {
          "type": "integer",
          "description": "Revision generation when the attachment was added",
          "minimum": 1
        },
        "stub": {
          "type": "boolean",
          "description": "Whether this is a stub reference (true) or contains inline data (false)"
        },
        "data": {
          "type": "string",
          "description": "Base64-encoded attachment data (only present when not a stub)",
          "contentEncoding": "base64"
        }
      },
      "required": [
        "content_type",
        "length"
      ]
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/couchbase-document"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.