Skip to the page

Reference · Control API

Clusters

Provision, scale, back up and restore clusters, and place maintenance holds.

In the schema
—

Provisioning and inspection#

Cluster routes provision dedicated compute and PostgreSQL shards, scale engines and replicas online, manage maintenance holds and configure object, search and backup storage.

Dedicated engines, primaries and replicas

Provision solo, standard or multi-shard scale topologies and resize engines, replicas and shard counts online without dropping traffic.

Base backups and point-in-time recovery

Every cluster starts with nightly base backups, on-demand shard snapshots, configurable 7 to 90 day retention windows and controlled switchovers.

RouteDescriptionScope
GET /clusters#List all clusters in the organization with topology, status and monthly rateScoperead
POST /clustersProvision a new cluster (returns 202 Accepted with the provisioning operation)Scopemanage
GET /clusters/{id}#Read one cluster with the members’ current roles and state, the machines and the storageScoperead
GET /clusters/{id}/operations#List the operations run on the cluster, newest firstScoperead
GET /clusters/{id}/placement#Inspect branch volume utilization per shard and suggested branch rebalancing movesScoperead
GET /clusters/{id}/state#Read failover status, each shard’s primary and the settings version applied on each machineScoperead
GET /machine-sizes#List the machine sizes a cluster can take, by CPU typeScoperead

POST/clusters#

Request body

namestringrequired
Cluster name (1–128 characters).
shapestringrequired
Topology preset: solo (one database machine and one engine), standard (primary and replica) or scale (two or more database machines).
membersobject[]required
First shard’s PostgreSQL machines, primary first. Each item specifies region (three-letter airport code such as iad), cpuType (shared or performance for dedicated CPUs), cpus, memoryBytes (in 256 MiB steps from GET /machine-sizes) and volumeSizeBytes (whole GiB).
enginesobject[]required
Stateless Napalm engines, each taking region, cpuType (shared or performance for dedicated CPUs), cpus and memoryBytes.
labelstring | null
Subdomain label (1–40 lowercase letters, digits and inner hyphens) for <label>.napalmdata.com and file bucket hosts. Set once across Napalm (409 label_taken when already claimed).

Every new cluster runs the latest verified Napalm engine package and starts with nightly base backups and a 7-day point-in-time restore window. Track provisioning progress with GET /operations/{id}, then create a project on the ready cluster with POST /projects.

Provision a dedicated cluster · curl
curl https://api.napalmdata.com/clusters \  -H "Authorization: Bearer $NAPALM_TOKEN" \  -H "Content-Type: application/json" \  -d {    "name": "production",    "shape": "standard",    "label": "notes",    "members": [      { "region": "iad", "cpuType": "performance", "cpus": 2, "memoryBytes": 4294967296, "volumeSizeBytes": 10737418240 },      { "region": "iad", "cpuType": "performance", "cpus": 2, "memoryBytes": 4294967296, "volumeSizeBytes": 10737418240 }    ],    "engines": [      { "region": "iad", "cpuType": "shared", "cpus": 2, "memoryBytes": 2147483648 },      { "region": "iad", "cpuType": "shared", "cpus": 2, "memoryBytes": 2147483648 }    ]  }
Response (202 Accepted)
{  "operation": {    "id": "0192c3f4-6b1a-7d8e-9f00-1a2b3c4d5e6f",    "operationType": "clusterProvision",    "status": "pending",    "clusterId": "7a1e9c2b-4d3f-4b8a-9e6c-2f1d0b8a7c35",    "orgId": "3c8f1a2e-9b4d-4e7c-a1f6-5d2b8e0c9a47",    "insertTime": "2026-11-10T14:12:00Z"  }}

Scaling and maintenance holds#

RouteDescriptionScope
POST /clusters/{id}/scalesChange the engine count, CPU and memory, the database machines’ CPU and memory, the replicas per shard or the number of data shardsScopemanage
POST /clusters/{id}/hold#Place or change a hold on Napalm’s own maintenance of the cluster, such as nightly backups and certificate renewalsScopemanage
POST /clusters/{id}/hold/remove#Lift the hold so the waiting maintenance runsScopemanage
POST /clusters/{id}/backup-retention#Set the restore window to 7, 14, 30 or 90 daysScopemanage

POST/clusters/{id}/scales#

Request body

engineCountintegerrequired
Total stateless engines (at least 1).
engineCpuTypestringrequired
CPU class for every engine: shared or performance (dedicated CPUs).
engineMemoryBytesintegerrequired
Memory per engine in bytes, in 256 MiB steps from 512 MiB (GET /machine-sizes).
engineCpusinteger
CPUs per engine (GET /machine-sizes). When omitted, CPU count follows memory.
memberCpuTypestringrequired
CPU class for every database machine: shared or performance (dedicated CPUs).
memberMemoryBytesintegerrequired
Memory per database machine in bytes, in 256 MiB steps (GET /machine-sizes).
memberCpusinteger
CPUs per database machine (GET /machine-sizes). When omitted, CPU count follows memory.
replicaCountintegerrequired
Replicas per data shard beside the primary (at least 1 on a cluster with automatic failover).
dataShardCountintegerrequired
Total data shards on the cluster (at least the cluster’s current data shard count).

Scaling runs online and returns 202 Accepted with a clusterScale operation. The operation updates engines first, one at a time, so the endpoint keeps serving. Any new data shards provision next, and database machines resize last, replicas before the primary.

Scale engines, replicas and memory · curl
curl https://api.napalmdata.com/clusters/$CLUSTER/scales \  -H "Authorization: Bearer $NAPALM_TOKEN" \  -H "Content-Type: application/json" \  -d {    "engineCount": 4,    "engineCpuType": "shared",    "engineMemoryBytes": 2147483648,    "memberCpuType": "performance",    "memberMemoryBytes": 8589934592,    "replicaCount": 2,    "dataShardCount": 1  }
Response (202 Accepted)
{  "operation": {    "id": "0192c401-8d2c-7e1f-a300-4b5c6d7e8f90",    "operationType": "clusterScale",    "status": "pending",    "clusterId": "7a1e9c2b-4d3f-4b8a-9e6c-2f1d0b8a7c35",    "orgId": "3c8f1a2e-9b4d-4e7c-a1f6-5d2b8e0c9a47",    "engineCount": 4,    "engineCpuType": "shared",    "engineMemoryBytes": 2147483648,    "memberCpuType": "performance",    "memberMemoryBytes": 8589934592,    "replicaCount": 2,    "dataShardCount": 1,    "insertTime": "2026-11-10T16:45:00Z"  }}

POST /clusters/{id}/hold

reasonstringrequired
The hold’s purpose, up to 256 characters.
expireTimestringrequired
When the hold lifts, in RFC 3339. The time must be in the future and at most a week after the hold is placed.

Backups, restores and switchovers#

RouteDescriptionScope
GET /clusters/{id}/backups#List completed base backups and the continuous point-in-time recovery window per shardScoperead
POST /clusters/{id}/backups#Trigger an immediate on-demand base backup of main’s shard or a named shardScopemanage
POST /clusters/{id}/switchovers#Perform a controlled primary-to-replica switchover on a shardScopemanage

Restores are per branch. Request a restore with POST /projects/{id}/branch-restores. See Scale and recovery for details on base backups, restore windows and automatic vs. manual switchovers.

Storage, search and custom domains#

RouteDescriptionScope
POST /clusters/{id}/log-storage#Keep a change log for the cluster with a retentionDays windowScopemanage
POST /clusters/{id}/file-storage#Provision public and private buckets for ext::files::File recordsScopemanage
POST /clusters/{id}/file-sweeps#Trigger an immediate garbage-collection sweep for unreferenced stored filesScopemanage
POST /clusters/{id}/content-hosts#Bind a custom domain to the project’s public file bucketScopemanage
POST /clusters/{id}/certificate#Provision or renew TLS certificates for the cluster’s custom endpointsScopemanage
POST /clusters/{id}/search-storage#Give the cluster a dedicated bucket for search indexesScopemanage
POST /clusters/{id}/search-sweeps#Trigger an immediate sweep of the search bucketScopemanage
GET /clusters/{id}/search-indexes#List the cluster’s search indexes with each index’s tier and unpublished rowsScoperead
POST /search-indexes/{id}/publishes#Publish a search index now, or retrain the indexScopemanage
POST /search-indexes/{id}/settings#Choose the storage tier a search index keepsScopemanage

Spend limits and concurrency#

Cluster provisioning and scaling requests are checked against two monthly ceilings before any compute capacity is allocated.

monthly_limit_reached (402)Organization quota
Returned when the projected monthly run-rate of active machines plus current-month metered overages would exceed the organization’s approved quota ($0 until a card is added, then starting at $500/mo and doubling with each paid monthly invoice up to $8,000/mo).
payment_method_required (402)No card
Returned when the organization has no card. A card is needed before the first machine.
payment_failed (402)Card declined
Returned when the card declines the upfront charge for the requested machines through the end of the month. error.message carries the card issuer’s reason, and nothing is created.
billing_unavailable (503)Billing
Returned when the billing provider cannot process the upfront charge right now. Nothing is charged or created.
monthly_cap_reached (402)Manager spend cap
Returned when the operation would exceed the self-imposed monthly spend cap configured via POST /org/spend-limits.
payment_overdue (402)Billing hold
Returned when the organization has an unpaid past-due invoice.

Only one infrastructure operation may run on a cluster at a time, so concurrent mutation requests return 409 cluster_busy. Background file and search sweeps run independently and only serialize against other sweeps of the same kind.

Torn-down clusters#

When a cluster is decommissioned (state: "tornDown"), Napalm releases its machines, volumes and network addresses and disables the associated project API. Catalog metadata is preserved for audit history. File buckets stop serving traffic but keep stored objects for 60 days (bucketDeletionTime), and then Napalm deletes every bucket. Remove any custom domain’s CNAME record that points at a file bucket before then. Once a bucket is deleted, another customer who claims the bucket name could serve files on any domain still pointing at it.

Type a word or two to search every docs page.