# Couchbase Capella

> Manage your Couchbase Capella databases: projects, clusters, buckets, scopes, collections and allowed IP addresses, and read, write, count, search and query documents.

App · 30 actions. Web page: https://docs.lodol.com/docs/integrations/couchbase-capella

## Actions

### Add allowed address

Allow an IP address or range (like 203.0.113.0/24) to connect to a cluster, optionally until a time.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- IP address or range (`cidr`, text, required): An IPv4 address, or a range such as 203.0.113.0/24.
- Comment (`comment`, text): A note about why, shown in Capella.
- Allowed until (`expires_at`, date and time): Stop allowing it at this time. Leave empty to allow it until removed.

**Outputs**

- `allowed_cidr` (object): The new entry
- `allowed_cidr_id` (text): The new entry's id

**Example output**

```json
{
  "allowed_cidr": {
    "audit": {
      "createdAt": "2026-10-15T09:00:00Z",
      "createdBy": "user-id",
      "modifiedAt": "2026-10-15T09:00:00Z",
      "modifiedBy": "user-id",
      "version": 1
    },
    "cidr": "203.0.113.0/24",
    "comment": "Office",
    "expiresAt": "",
    "id": "cidr-0001",
    "status": "active",
    "type": "permanent"
  },
  "allowed_cidr_id": "cidr-0001"
}
```

### Change counter

Add to a counter document and return its new value; a negative amount subtracts. A starting value creates it when missing.

**Inputs**

- Bucket (`bucket`, text, required): The bucket's name, read from the cluster. Type it if it is not listed.
- Scope (`scope`, text, required): The scope's name. Every bucket has one called _default.
- Collection (`collection`, text, required): The collection's name. Every scope has one called _default.
- Document key (`key`, text, required): The document's key (its unique id in the collection), up to 250 bytes.
- Change by (`delta`, number, required): How much to add; use a negative number to subtract.
- Start at (`initial`, number): Create the counter with this value if it does not exist. Leave empty to fail instead. At least 0.

**Outputs**

- `key` (text): The counter's key
- `value` (number): The counter's new value

**Example output**

```json
{
  "key": "visits",
  "value": 8
}
```

### Create bucket

Create a bucket, the top-level container for data. The result includes its id. On a free tier cluster only name and memory apply.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Name (`name`, text, required): The bucket's name: letters, digits and _ . % -, up to 100.
- Memory (MiB) (`memory_mb`, number): Memory for the bucket, at least 100. Leave empty for Capella's default. At least 100.
- Type (`bucket_type`, text): Couchbase buckets are stored on disk; ephemeral ones live in memory only. One of: `couchbase` (Couchbase (default)), `ephemeral` (Ephemeral (memory only)).
- Storage engine (`storage_backend`, text): How a Couchbase bucket is stored. Leave empty for Capella's default. One of: `couchstore`, `magma`.
- Conflict resolution (`conflict_resolution`, text): Which copy wins when two clusters change the same document. One of: `seqno` (Sequence number (default)), `lww` (Last write wins).
- Durability (`durability_level`, text): How many copies must confirm a write before it counts. One of: `none` (None (default)), `majority`, `majorityAndPersistActive` (Majority and persist on active), `persistToMajority` (Persist to majority).
- Replicas (`replicas`, text): How many extra copies of the data to keep, 1 to 3. One of: `1` (1 replica (default)), `2` (2 replicas), `3` (3 replicas).
- Allow flushing (`flush_enabled`, true/false): Whether every document in the bucket can be erased at once from Capella.
- Document lifetime (seconds) (`time_to_live_seconds`, number): Delete documents this long after they are written. 0 keeps them for ever. At least 0.
- Eviction (`eviction_policy`, text): What to do when memory is full. One of: `fullEviction` (Full eviction (default)), `noEviction` (No eviction), `nruEviction` (Not-recently-used eviction).

**Outputs**

- `bucket` (object): The new bucket
- `bucket_id` (text): The new bucket's id

**Example output**

```json
{
  "bucket": {
    "bucketConflictResolution": "seqno",
    "durabilityLevel": "none",
    "evictionPolicy": "fullEviction",
    "flushEnabled": false,
    "id": "b3JkZXJz",
    "memoryAllocationInMb": 100,
    "name": "orders",
    "replicas": 1,
    "stats": {
      "diskUsedInMib": 12,
      "itemCount": 1200,
      "memoryUsedInMib": 40,
      "opsPerSecond": 3
    },
    "storageBackend": "couchstore",
    "timeToLiveInSeconds": 0,
    "type": "couchbase"
  },
  "bucket_id": "b3JkZXJz"
}
```

### Create collection

Create a collection in a scope, the place documents are stored (like a table).

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Scope (`scope_name`, text, required): The scope in that bucket.
- Collection name (`collection_name`, text, required): Letters, digits and _ - %, up to 251, not starting with _ or %.
- Document lifetime (seconds) (`max_ttl_seconds`, number): Delete documents this long after they are written. 0 uses the bucket's setting, -1 never deletes them (Couchbase Server 7.6 and later). At least -1.

**Outputs**

- `collection` (object): The new collection
- `collection_name` (text): The new collection's name

**Example output**

```json
{
  "collection": {
    "maxTTL": 0,
    "name": "invoices"
  },
  "collection_name": "invoices"
}
```

### Create document

Add a new document under a key. It fails if the key is already used; use Update document to replace one.

**Inputs**

- Bucket (`bucket`, text, required): The bucket's name, read from the cluster. Type it if it is not listed.
- Scope (`scope`, text, required): The scope's name. Every bucket has one called _default.
- Collection (`collection`, text, required): The collection's name. Every scope has one called _default.
- Document key (`key`, text, required): The document's key (its unique id in the collection), up to 250 bytes.
- Document (`document`, object, required): The document's content, as fields and values.

**Outputs**

- `cas` (text): The document's version (CAS)
- `created` (true/false): Always true once created
- `key` (text): The document's key

**Example output**

```json
{
  "cas": "1700000000000",
  "created": true,
  "key": "order::1001"
}
```

### Create project

Create an empty project to group clusters. The result includes its id.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Name (`name`, text, required): The project's name, up to 128 characters.
- Description (`description`, text): A short description, up to 256 characters.

**Outputs**

- `project` (object): The new project
- `project_id` (text): The new project's id

**Example output**

```json
{
  "project": {
    "audit": {
      "createdAt": "2026-10-15T09:00:00Z",
      "createdBy": "user-id",
      "modifiedAt": "2026-10-15T09:00:00Z",
      "modifiedBy": "user-id",
      "version": 1
    },
    "description": "Orders and customers",
    "id": "ffffffff-aaaa-1414-eeee-000000000001",
    "name": "Customer data"
  },
  "project_id": "ffffffff-aaaa-1414-eeee-000000000001"
}
```

### Create scope

Create a scope in a bucket, a named group of collections.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Scope name (`scope_name`, text, required): Letters, digits and _ - %, up to 251, not starting with _ or %.

**Outputs**

- `scope` (object): The new scope
- `scope_name` (text): The new scope's name

**Example output**

```json
{
  "scope": {
    "collections": [
      {
        "maxTTL": 0,
        "name": "invoices"
      }
    ],
    "name": "sales"
  },
  "scope_name": "sales"
}
```

### Delete allowed address

Stop allowing an IP address or range to connect to a cluster.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Allowed address (`allowed_cidr_id`, text, required): The allowed IP address or range on that cluster.

**Outputs**

- `allowed_cidr_id` (text): The entry deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "allowed_cidr_id": "cidr-0001",
  "deleted": true
}
```

### Delete bucket

Delete a bucket and every scope, collection and document in it. This cannot be undone.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.

**Outputs**

- `bucket_id` (text): The bucket deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "bucket_id": "b3JkZXJz",
  "deleted": true
}
```

### Delete collection

Delete a collection and every document in it. This cannot be undone.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Scope (`scope_name`, text, required): The scope in that bucket.
- Collection (`collection_name`, text, required): The collection in that scope.

**Outputs**

- `collection_name` (text): The collection deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "collection_name": "invoices",
  "deleted": true
}
```

### Delete document

Delete a document by its key.

**Inputs**

- Bucket (`bucket`, text, required): The bucket's name, read from the cluster. Type it if it is not listed.
- Scope (`scope`, text, required): The scope's name. Every bucket has one called _default.
- Collection (`collection`, text, required): The collection's name. Every scope has one called _default.
- Document key (`key`, text, required): The document's key (its unique id in the collection), up to 250 bytes.

**Outputs**

- `cas` (text): The deleted document's version (CAS)
- `deleted` (true/false): Always true once deleted
- `key` (text): The document's key

**Example output**

```json
{
  "cas": "1700000000002",
  "deleted": true,
  "key": "order::1001"
}
```

### Delete project

Delete a project. Capella refuses while the project still has clusters.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `project_id` (text): The project deleted

**Example output**

```json
{
  "deleted": true,
  "project_id": "ffffffff-aaaa-1414-eeee-000000000001"
}
```

### Delete scope

Delete a scope with all its collections and documents. This cannot be undone.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Scope (`scope_name`, text, required): The scope in that bucket.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `scope_name` (text): The scope deleted

**Example output**

```json
{
  "deleted": true,
  "scope_name": "sales"
}
```

### Find documents

Find the documents in a collection whose field matches a value, with optional sorting. No SQL++ needed; the collection needs an index.

**Inputs**

- Bucket (`bucket`, text, required): The bucket's name, read from the cluster. Type it if it is not listed.
- Scope (`scope`, text, required): The scope's name. Every bucket has one called _default.
- Collection (`collection`, text, required): The collection's name. Every scope has one called _default.
- Field (`field_name`, text): Only documents whose field matches. Use address.city for a nested field. Leave empty for all.
- Comparison (`operator`, text): How the field is compared with the value. Defaults to equals. One of: `equals` (Equals (default)), `not_equals` (Does not equal), `greater_than` (Greater than), `greater_or_equal` (Greater than or equal to), `less_than` (Less than), `less_or_equal` (Less than or equal to), `contains` (Contains (text)), `starts_with` (Starts with (text)).
- Value (`value`, text): The value to compare the field with. Needed when a field is given.
- Sort by (`sort_field`, text): A field to sort the documents by. Leave empty for no order.
- Sort order (`sort_direction`, text): Used with Sort by. Defaults to ascending. One of: `asc` (Ascending (default)), `desc` (Descending).
- Most documents (`limit`, number): How many documents to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many matched
- `documents` (list): Each match, as its key (id) and content (document)
- `statement` (text): The SQL++ that was run

**Example output**

```json
{
  "count": 1,
  "documents": [
    {
      "document": {
        "status": "paid"
      },
      "id": "order::1001"
    }
  ],
  "statement": "SELECT META(d).id AS id, d AS document FROM `orders`.`_default`.`_default` AS d LIMIT 100"
}
```

### Get bucket

Get one bucket's settings and statistics.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.

**Outputs**

- `bucket` (object): The bucket

**Example output**

```json
{
  "bucket": {
    "bucketConflictResolution": "seqno",
    "durabilityLevel": "none",
    "evictionPolicy": "fullEviction",
    "flushEnabled": false,
    "id": "b3JkZXJz",
    "memoryAllocationInMb": 100,
    "name": "orders",
    "replicas": 1,
    "stats": {
      "diskUsedInMib": 12,
      "itemCount": 1200,
      "memoryUsedInMib": 40,
      "opsPerSecond": 3
    },
    "storageBackend": "couchstore",
    "timeToLiveInSeconds": 0,
    "type": "couchbase"
  }
}
```

### Get cluster

Get one cluster: its state, cloud and region, Couchbase version and connection string.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.

**Outputs**

- `cluster` (object): The cluster

**Example output**

```json
{
  "cluster": {
    "audit": {
      "createdAt": "2026-10-15T09:00:00Z",
      "createdBy": "user-id",
      "modifiedAt": "2026-10-15T09:00:00Z",
      "modifiedBy": "user-id",
      "version": 1
    },
    "availability": {
      "type": "multi"
    },
    "cloudProvider": {
      "cidr": "10.0.0.0/20",
      "region": "us-east-1",
      "type": "aws"
    },
    "configurationType": "multiNode",
    "connectionString": "cb.example.cloud.couchbase.com",
    "couchbaseServer": {
      "version": "7.6"
    },
    "currentState": "healthy",
    "deletionProtection": false,
    "description": "",
    "id": "ffffffff-aaaa-1414-eeee-000000000002",
    "name": "prod",
    "support": {
      "plan": "developer pro",
      "timezone": "PT"
    }
  }
}
```

### Get document

Read one document by its key. Needs the Data API details in the connection.

**Inputs**

- Bucket (`bucket`, text, required): The bucket's name, read from the cluster. Type it if it is not listed.
- Scope (`scope`, text, required): The scope's name. Every bucket has one called _default.
- Collection (`collection`, text, required): The collection's name. Every scope has one called _default.
- Document key (`key`, text, required): The document's key (its unique id in the collection), up to 250 bytes.

**Outputs**

- `cas` (text): The document's version (CAS), changes with every write
- `document` (object): The document's content
- `key` (text): The document's key

**Example output**

```json
{
  "cas": "1700000000000",
  "document": {
    "total": 42
  },
  "key": "order::1001"
}
```

### Get project

Get one project with its name, description and who last changed it.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.

**Outputs**

- `project` (object): The project

**Example output**

```json
{
  "project": {
    "audit": {
      "createdAt": "2026-10-15T09:00:00Z",
      "createdBy": "user-id",
      "modifiedAt": "2026-10-15T09:00:00Z",
      "modifiedBy": "user-id",
      "version": 1
    },
    "description": "Orders and customers",
    "id": "ffffffff-aaaa-1414-eeee-000000000001",
    "name": "Customer data"
  }
}
```

### List allowed addresses

List the IP addresses and ranges allowed to connect to a cluster.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Page (`page`, number): Which page to get, starting at 1. Capella's default is 1. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capella's default is 10. From 1 to 100.

**Outputs**

- `allowed_cidrs` (list): The addresses on this page
- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `last_page` (number): The number of the last page
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page's number
- `per_page` (number): The page size used
- `total_items` (number): How many there are in all

**Example output**

```json
{
  "allowed_cidrs": [
    {
      "audit": {
        "createdAt": "2026-10-15T09:00:00Z",
        "createdBy": "user-id",
        "modifiedAt": "2026-10-15T09:00:00Z",
        "modifiedBy": "user-id",
        "version": 1
      },
      "cidr": "203.0.113.0/24",
      "comment": "Office",
      "expiresAt": "",
      "id": "cidr-0001",
      "status": "active",
      "type": "permanent"
    }
  ],
  "count": 1,
  "has_more": false,
  "last_page": 1,
  "next_page": 0,
  "page": 1,
  "per_page": 10,
  "total_items": 1
}
```

### List buckets

List a cluster's buckets with their settings, item counts and memory use.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.

**Outputs**

- `buckets` (list): The buckets
- `cluster_stats` (object): Free and total memory on the cluster
- `count` (number): How many

**Example output**

```json
{
  "buckets": [
    {
      "bucketConflictResolution": "seqno",
      "durabilityLevel": "none",
      "evictionPolicy": "fullEviction",
      "flushEnabled": false,
      "id": "b3JkZXJz",
      "memoryAllocationInMb": 100,
      "name": "orders",
      "replicas": 1,
      "stats": {
        "diskUsedInMib": 12,
        "itemCount": 1200,
        "memoryUsedInMib": 40,
        "opsPerSecond": 3
      },
      "storageBackend": "couchstore",
      "timeToLiveInSeconds": 0,
      "type": "couchbase"
    }
  ],
  "cluster_stats": {
    "freeMemoryInMb": 800,
    "maxReplicas": 2,
    "totalMemoryInMb": 1000
  },
  "count": 1
}
```

### List clusters

List a project's database clusters with their state, cloud and connection string.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Page (`page`, number): Which page to get, starting at 1. Capella's default is 1. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capella's default is 10. From 1 to 100.

**Outputs**

- `clusters` (list): The clusters on this page
- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `last_page` (number): The number of the last page
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page's number
- `per_page` (number): The page size used
- `total_items` (number): How many there are in all

**Example output**

```json
{
  "clusters": [
    {
      "audit": {
        "createdAt": "2026-10-15T09:00:00Z",
        "createdBy": "user-id",
        "modifiedAt": "2026-10-15T09:00:00Z",
        "modifiedBy": "user-id",
        "version": 1
      },
      "availability": {
        "type": "multi"
      },
      "cloudProvider": {
        "cidr": "10.0.0.0/20",
        "region": "us-east-1",
        "type": "aws"
      },
      "configurationType": "multiNode",
      "connectionString": "cb.example.cloud.couchbase.com",
      "couchbaseServer": {
        "version": "7.6"
      },
      "currentState": "healthy",
      "deletionProtection": false,
      "description": "",
      "id": "ffffffff-aaaa-1414-eeee-000000000002",
      "name": "prod",
      "support": {
        "plan": "developer pro",
        "timezone": "PT"
      }
    }
  ],
  "count": 1,
  "has_more": false,
  "last_page": 1,
  "next_page": 0,
  "page": 1,
  "per_page": 10,
  "total_items": 1
}
```

### List collections

List a scope's collections with their document lifetime.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Scope (`scope_name`, text, required): The scope in that bucket.

**Outputs**

- `collections` (list): The collections
- `count` (number): How many

**Example output**

```json
{
  "collections": [
    {
      "maxTTL": 0,
      "name": "invoices"
    }
  ],
  "count": 1
}
```

### List organizations

List the Capella organizations the API key can see, with their ids.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `organizations` (list): The organizations

**Example output**

```json
{
  "count": 1,
  "organizations": [
    {
      "audit": {
        "createdAt": "2026-10-15T09:00:00Z",
        "createdBy": "user-id",
        "modifiedAt": "2026-10-15T09:00:00Z",
        "modifiedBy": "user-id",
        "version": 1
      },
      "description": "",
      "id": "ffffffff-aaaa-1414-eeee-000000000000",
      "name": "Acme",
      "subdomain": "acme"
    }
  ]
}
```

### List projects

List an organization's projects, one page at a time.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Page (`page`, number): Which page to get, starting at 1. Capella's default is 1. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capella's default is 10. From 1 to 100.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `last_page` (number): The number of the last page
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page's number
- `per_page` (number): The page size used
- `projects` (list): The projects on this page
- `total_items` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "last_page": 1,
  "next_page": 0,
  "page": 1,
  "per_page": 10,
  "projects": [
    {
      "audit": {
        "createdAt": "2026-10-15T09:00:00Z",
        "createdBy": "user-id",
        "modifiedAt": "2026-10-15T09:00:00Z",
        "modifiedBy": "user-id",
        "version": 1
      },
      "description": "Orders and customers",
      "id": "ffffffff-aaaa-1414-eeee-000000000001",
      "name": "Customer data"
    }
  ],
  "total_items": 1
}
```

### List scopes

List a bucket's scopes, each with its collections.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.

**Outputs**

- `count` (number): How many
- `scopes` (list): The scopes

**Example output**

```json
{
  "count": 1,
  "scopes": [
    {
      "collections": [
        {
          "maxTTL": 0,
          "name": "invoices"
        }
      ],
      "name": "sales"
    }
  ]
}
```

### Run SQL++ query

Run a SQL++ (N1QL) statement, such as a SELECT, an UPDATE or CREATE INDEX, and get its rows back.

**Inputs**

- SQL++ statement (`statement`, text, required): The statement to run, such as SELECT * FROM `orders`.`_default`.`_default` WHERE total > $min LIMIT 10. Use $name or $1 for values from Parameters.
- Default bucket (`bucket`, text): Let the statement name collections without the bucket.
- Default scope (`scope`, text): With a default bucket, the scope names are looked up in. Defaults to _default.
- Parameters (`parameters`, object): Values for the statement, as named values ({"min": 10} for $min) or a list for $1, $2. Passing values here avoids escaping them.
- Only allow reads (`read_only`, true/false): Refuse statements that change data or indexes.
- Freshness (`scan_consistency`, text): Whether results must include writes made just before the query. One of: `not_bounded` (Fastest, may miss very recent writes (default)), `request_plus` (Include every write made before the query).
- Time limit (seconds) (`timeout_seconds`, number): Stop the query after this long, 1 to 70. From 1 to 70.

**Outputs**

- `count` (number): How many rows
- `metrics` (object): Timing, result count and mutation count
- `request_id` (text): Capella's id for the request
- `results` (list): The rows the statement returned
- `status` (text): The query's status, success when it worked
- `warnings` (list): Warnings from the query

**Example output**

```json
{
  "count": 1,
  "metrics": {
    "elapsedTime": "3ms",
    "resultCount": 1
  },
  "request_id": "5f1d1c5a-0000-0000-0000-000000000000",
  "results": [
    {
      "one": 1
    }
  ],
  "status": "success",
  "warnings": []
}
```

### Update bucket

Change a bucket's memory, durability, replicas, flush setting or document lifetime. Only the settings given change.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Memory (MiB) (`memory_mb`, number): A new memory size, at least 100. Leave empty to keep it. At least 100.
- Durability (`durability_level`, text): A new durability level. Leave empty to keep it. One of: `none` (None (default)), `majority`, `majorityAndPersistActive` (Majority and persist on active), `persistToMajority` (Persist to majority).
- Replicas (`replicas`, text): A new number of replicas. Leave empty to keep it. One of: `1` (1 replica (default)), `2` (2 replicas), `3` (3 replicas).
- Allow flushing (`flush_enabled`, true/false): Turn flushing on or off. Leave unset to keep it.
- Document lifetime (seconds) (`time_to_live_seconds`, number): A new lifetime for documents, 0 for none. Leave empty to keep it. At least 0.

**Outputs**

- `bucket` (object): The bucket

**Example output**

```json
{
  "bucket": {
    "bucketConflictResolution": "seqno",
    "durabilityLevel": "none",
    "evictionPolicy": "fullEviction",
    "flushEnabled": false,
    "id": "b3JkZXJz",
    "memoryAllocationInMb": 200,
    "name": "orders",
    "replicas": 1,
    "stats": {
      "diskUsedInMib": 12,
      "itemCount": 1200,
      "memoryUsedInMib": 40,
      "opsPerSecond": 3
    },
    "storageBackend": "couchstore",
    "timeToLiveInSeconds": 0,
    "type": "couchbase"
  }
}
```

### Update collection

Change how long documents in a collection are kept before Capella deletes them.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Cluster (`cluster_id`, text, required): The database cluster in that project.
- Bucket (`bucket_id`, text, required): The bucket on that cluster. Pick one, or give the id from 'Create bucket'.
- Scope (`scope_name`, text, required): The scope in that bucket.
- Collection (`collection_name`, text, required): The collection in that scope.
- Document lifetime (seconds) (`max_ttl_seconds`, number, required): Delete documents this long after they are written. 0 uses the bucket's setting, -1 never deletes them (Couchbase Server 7.6 and later). At least -1.

**Outputs**

- `collection` (object): The collection

**Example output**

```json
{
  "collection": {
    "maxTTL": 86400,
    "name": "invoices"
  }
}
```

### Update document

Replace the whole content of an existing document. It fails if the key does not exist.

**Inputs**

- Bucket (`bucket`, text, required): The bucket's name, read from the cluster. Type it if it is not listed.
- Scope (`scope`, text, required): The scope's name. Every bucket has one called _default.
- Collection (`collection`, text, required): The collection's name. Every scope has one called _default.
- Document key (`key`, text, required): The document's key (its unique id in the collection), up to 250 bytes.
- Document (`document`, object, required): The document's content, as fields and values.

**Outputs**

- `cas` (text): The document's new version (CAS)
- `key` (text): The document's key
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "cas": "1700000000001",
  "key": "order::1001",
  "updated": true
}
```

### Update project

Rename a project or change its description. Only the fields given change.

**Inputs**

- Organization (`organization_id`, text, required): The Capella organization. Pick one, or give its id from an earlier step.
- Project (`project_id`, text, required): The project in that organization.
- Name (`name`, text): A new name. Leave empty to keep it.
- Description (`description`, text): A new description. Leave empty to keep it.

**Outputs**

- `project` (object): The project

**Example output**

```json
{
  "project": {
    "audit": {
      "createdAt": "2026-10-15T09:00:00Z",
      "createdBy": "user-id",
      "modifiedAt": "2026-10-15T09:00:00Z",
      "modifiedBy": "user-id",
      "version": 1
    },
    "description": "Orders and customers",
    "id": "ffffffff-aaaa-1414-eeee-000000000001",
    "name": "Customer data (live)"
  }
}
```
