Skip to content

Explicitly re-parent a capacity pool

POST
/capacity-pools/{pool_key}/parent
curl --request POST \
--url https://quikstik-core.fly.dev/capacity-pools/example/parent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "parent_key": "example" }'

Operator-scoped maintenance: the only sanctioned way to change an existing pool’s parent (a plain POST /capacity-pools upsert now preserves the current parent when parent_key is omitted). Sets pool_key’s parent to parent_key (or detaches it to a root when parent_key is null/omitted). step 1B: a node’s committed is derived from its leaves on every read, so re-parenting is just this update — the old chain’s derived committed drops and the new chain’s rises on the very next read, with no rebuild to run. Refuses (422) if the new parent is not in this tenant, does not exist, is the pool itself, or would close a cycle.

pool_key
required
string
x-tenant-id
required
string format: uuid

Tenant identifier (UUID).

Authn/authz semantics are intentionally TBD for this contract slice; this header exists to keep the contract explicitly multi-tenant from day 0.

Media typeapplication/json
object
parent_key

The new parent pool key, or null/omitted to detach pool_key to a root.

string
nullable >= 1 characters

Example generated

{
"parent_key": "example"
}

Parent set

No pool exists under pool_key for this tenant

Rejected nesting placement (unknown/cross-tenant/self/cyclical parent) or an empty parent_key