Skip to main content
PATCH
Change the published groups, bands or keys

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 service still has it. Correctness never depends on it.

Minimum string length: 1

Path Parameters

ns
string
required

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

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

Body

application/json

At least one of groups, bands and keys, each replacing the setting whole.

groups
string[]
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

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 only; the value itself is never published. An aggregate without bands does not appear.

keys
object

Key values a group publishes one by one, by group, such as {"by_plan": ["free", "pro", "team"]}. A key value comes from the tenant's attributes, so a tenant document names only the key values listed here, under the group's keys. Every group publishes its labels over all its key values together as all, listed or not.

confirm
boolean
default:false

Required, because the change re-judges every tenant document; without it, the response is the estimate.

Response

The tenant summary with the change, or the estimate when it needs confirm.

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/*. 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 only; the value itself is never published. An aggregate without bands does not appear.

keys
object
required

Key values a group publishes one by one, by group, such as {"by_plan": ["free", "pro", "team"]}. A key value comes from the tenant's attributes, so a tenant document names only the key values listed here, under the group's keys. Every group publishes its labels over all its key values together as all, listed or not.

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.