Skip to main content
POST
Make a version the one new evaluations use

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

One key per logical request, reused only on its retries. A key belongs to one request: within your organization, the same method, path, query and body. For 24 hours after a successful response, a request with the key and the same body gets that response back verbatim, with Idempotent-Replayed: true, and runs nothing. Only a successful response is kept, so the retry of a request that failed runs again. While the first request runs or its response is kept, the key with a different request is idempotency_key_reused (422). A request sent while one with its key is still running is rate_limited with Retry-After: 1, without running: retry it to get the first one's response. In the rare case the key can't be checked, the request runs as if it had none.

Required string length: 1 - 255

Path Parameters

ns
string
required

A namespace name, or a template prefix ending in /*, with any / sent as %2F: acme%2Fprod%2Ftenant_123 or acme%2Fprod%2F*.

A namespace name, or a template prefix: a namespace path ending in /*, such as acme/prod/*, which every namespace under acme/prod/ inherits judgments from. Up to 256 bytes. Never exactly . or .., which a URL path can't carry.

Required string length: 1 - 256
Pattern: ^(?!\.\.?$)[A-Za-z0-9._:/-]+(/\*)?$
name
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_-]+$

Body

application/json
version
integer<int32>
required
Required range: x >= 1
force
boolean
default:false

Activate at once, without a shadow report, when the engine or definition differs from the active version.

Response

The version is active.

name
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_-]+$
path
enum<string>
required

Whose account the active version runs on; the latest version's once the judgment is deactivated. Brussle never moves a judgment between the two; a version on the other engine, activated, does.

Available options:
included,
customer_key
active_version
integer<int32> | null
required

Null once the judgment is deactivated.

Required range: x >= 1
judged_through
integer<int64> | null
required

How far the judgment has judged this namespace's writes, as a revision. Every write whose revision is at or below it is done for this judgment: each document whose answer it affects has its answer, or its final attempt failed, or is one the judgment does not judge (outside applies_to, outside the fan-out's scope of a change to a document it reads, or already there when the judgment was created and waiting for a backfill). Compare it with the revision your last write returned: once it is at or above that, the judgment has finished with the write and every write before it.

A write the judgment has not finished with keeps it below that write, whatever the reason: being judged, waiting for its debounce or for the engine, judging paused, or no room in the rolling limit. The answers' freshness and stale_reason say which. For a judgment with a relation, a write to a document it reads keeps it below that write until the documents that read it are judged again. For a judgment whose relations read other judgments' answers (a roll-up, a judged link), a write keeps it below that write until each judgment it reads, down the chain, has finished with the write, and this judgment has judged again the documents whose answers it read changed. It can trail the answers by a moment, and never runs ahead of them.

Null when no revision can say this: the judgment has no active version, or its policy is not on_change (nothing judges writes as they arrive). It can also be null for a short time after an upgrade of Brussle, until the judgment has finished the work it had waiting. A strong query for a pending answer works for every judgment.

Required range: x >= 0
freshness
object
required

Settings, not part of the definition. Changing them creates no version.

thresholds
object
required

The judgment's named thresholds, a setting rather than part of a version. Each is a number for a bool judgment (true when p is at least it) or a score judgment (true when score is at least it), {value, gte} for a choice judgment (true when dist[value] is at least gte), or {feature, gte} or {feature, lte} for a bool judgment with features. They are evaluated at read time against the raw fields, never the calibrated ones. A threshold that does not fit the judgment's type, or names a feature or option its version does not have, is invalid_request.

outcomes
object
required

How the judgment's outcomes are read and derived, a setting rather than part of a version. See calibration.

versions
object[]
required

Every version, oldest first. Versions are kept until the namespace is deleted.

calibration
object

The calibration setting. Always present on a judgment read from a current deployment; mode is auto until a pin is set.

alternatives
object

The alternatives setting; absent while it is the default (automatic off, no engine skipped).

template
string

Present when the judgment is inherited, the template prefix it comes from, such as acme/prod/*.

Required string length: 1 - 256
Pattern: ^(?!\.\.?$)[A-Za-z0-9._:/-]+(/\*)?$
overrides
enum<string>[]

Present when the judgment is inherited. The settings this namespace overrides; the others follow the template.

Available options:
thresholds,
freshness
fanout_sources
object

Where each value in freshness.fanout comes from, key for key. Present exactly when freshness.fanout is, with the same keys: rolling_limit alone for a judgment with relations that cannot fan out. A where removed with null is the default, no filter; any other null the judgment set, such as created_within: null, is the judgment's.

fanout_window
object

Response only. How much of freshness.fanout.rolling_limit the judgment has used: the re-judgments counted in the rolling 30-day window, each counted once when its answer lands. Present exactly when freshness.fanout is, so on every judgment with a relation. Work that would take used past the limit waits, deferred.

budget_window
object

Response only. The judgment's engine calls in the period its freshness.budget counts, whether the budget is reached, and the last 7 days with a month projected from them, so a budget can be chosen before it is set. Present on every judgment.

escape_alert
number | null

A setting of a fixed-option choice: when the share of its answers over the last 7 days that are none_of_the_above rises above this, the judgment gains the taxonomy_drift warning and the events feed one judgment.taxonomy_drift. Null (the default) turns it off. Nothing changes on its own: run discover when you want proposals.

Required range: 0 < x <= 1
warnings
object[]

Conditions to act on, such as taxonomy_drift. Absent when there are none.

readers
string[]

The judgments whose relations read this one's answers. While there are any, a change that would break them is conflict naming them in details.readers. That is deleting or deactivating it, a policy other than on_change, a fan-out scope on a judgment that reads a referenced document or a block, removing a threshold a reader names, or a version that is a composite with parts or chooses among candidates (unless the reader only counts whether the value is none_of_the_above), whose answers lack a part a reader reads, that narrows applies_to below a reader's match, or that would make a reader read more than three deep (details.chain is the chain). For a judgment read through judged links, it is also a version that no longer chooses among candidates, or whose candidates share another key attribute. Absent when there are none.

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_-]+$
upstream
object[]

Each chain of judgments this one reads the answers of, from the one it reads first down to one that reads none, with their debounces summed. That is roughly how long a change at the end of the chain takes to reach this judgment, before its own debounce. Absent when it reads no answers.

stats
object

Today's evaluations of the judgment in this namespace, UTC. The dashboard's per-judgment numbers. Before the day's first evaluation only day, evaluations (0) and spend_usd (0) are present.

engine_status
object

The engine the active version runs on, as its new answers record it: which key it runs on, the epoch and model id new answers carry, how Brussle watches it for a change of behaviour, and a retirement its provider announced. A part Brussle cannot read at the moment is null.