Explicitly re-parent a capacity pool
const url = 'https://quikstik-core.fly.dev/capacity-pools/example/parent';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"parent_key":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The new parent pool key, or null/omitted to detach pool_key to a root.
Example generated
{ "parent_key": "example"}Responses
Section titled “Responses”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