Skip to main content
POST
Publish a tenant document per namespace under a template

Authorizations

Authorization
string
header
required

An organization API key. Keys carry a role (read_write or read_only) and may be restricted to a namespace prefix such as acme/*, or to one namespace such as acme/prod/tenant_1. A prefix matches on a / boundary: acme/prod/tenant_1* covers acme/prod/tenant_1 and everything under acme/prod/tenant_1/, never acme/prod/tenant_12.

Headers

Idempotency-Key
string

Returns the original response verbatim while the node still caches it. Correctness never depends on it.

Minimum string length: 1

Path Parameters

ns
string
required

A template prefix ending in /* (§7.7), with every / sent as %2F, such as acme%2Fprod%2F*. A template prefix, a namespace path ending in /*, such as acme/prod/* (§7.7). Up to 256 bytes.

Required string length: 3 - 256
Pattern: ^[A-Za-z0-9._:/-]+/\*$

Body

application/json

Relations (§7.7). Which of the template's groups each tenant publishes, and their bands.

groups
string[]
required
Required array length: 1 - 8 elements

A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
bands
object
required

Bands for published aggregates, keyed <group>.<aggregate> as a judgment names them, such as abuse_by_day.count or by_plan.avg(state.mrr). A tenant document shows each as its band's label; values are only in state.source.

Response

Created. The first run starts within the hour; until then every tenant is pending.

Relations (§7.7). A template's tenant summary and a page of its tenants.

template
string
required

A template prefix, a namespace path ending in /*, such as acme/prod/* (§7.7). Up to 256 bytes.

Required string length: 3 - 256
Pattern: ^[A-Za-z0-9._:/-]+/\*$
groups
string[]
required

A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
bands
object
required

Bands for published aggregates, keyed <group>.<aggregate> as a judgment names them, such as abuse_by_day.count or by_plan.avg(state.mrr). A tenant document shows each as its band's label; values are only in state.source.

created_at
string<date-time>
required

RFC 3339, UTC.

warnings
enum<string>[]
required

tenant_summary_failed: the template's namespace refused the last run's writes, such as over its limits with on_exceeded: reject; the events feed has namespace.tenant_summary_failed.

Available options:
tenant_summary_failed
tenants
object[]
required
next_cursor
string | null
required
last_run_at
string<date-time> | null

When the last run finished; null before the first.