Skip to main content
PATCH
Change freshness, thresholds and outcome settings without a new version

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

At least one of freshness, thresholds, outcomes, escape_alert, calibration and alternatives. calibration and alternatives each go in a request of their own.

freshness
object
required

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

thresholds
object

Replaces the judgment's whole set of named thresholds; {} removes them all. Applies at the next read, with no evaluation and no new version. Changing one that a reader's relation names needs confirm and runs a resync job.

outcomes
object

Replaces how outcomes are read and derived, rules included. The next fit and every report use it, and rules apply to writes from then on; no version is created.

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
calibration
object

Replaces the judgment's pins whole; {"pins": []} lifts them all. Send it alone, without other settings. A pin on a judgment with features changes what p reads, so the judgments that read it are re-judged where their rendering changes, billed as any re-judge: while any judgment reads it, the request needs confirm (without it, the answer is the downstream estimate and nothing changes), and the resync job's pass ends with judgment.fit_applied or judgment.fit_withdrawn. Not on a namespace that inherits the judgment: set it on the template.

alternatives
object

Replaces the alternatives setting. Turning automatic on starts a billed run by itself after each fit, at most monthly, so it needs confirm: without it, the answer is the quote of a full run (alternatives_quote) and nothing changes. On the Team plan and above; not on a namespace that inherits the judgment.

confirm
boolean
default:false

Required to switch to on_change, which starts a backfill, to change a threshold a reader's relation names, which starts a resync job, to pin a fit of a judgment with features that other judgments read, which starts one too, and to turn alternatives.automatic on, which bills a run after each fit.

Response

The settings were applied, or an estimate was returned.

judgment
object
required
job_id
string

The backfill started by a confirmed switch to on_change, or the resync job a confirmed threshold change or pin started.

downstream
object[]

With a confirmed threshold change that readers' relations name, or a confirmed pin on a judgment with features, what it costs each reader.