curl --request POST \
--url https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": [
"attributes.plan",
"Eq",
"pro"
],
"confirm": false
}
'import requests
url = "https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill"
payload = {
"filters": ["attributes.plan", "Eq", "pro"],
"confirm": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filters: ['attributes.plan', 'Eq', 'pro'], confirm: false})
};
fetch('https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'attributes.plan',
'Eq',
'pro'
],
'confirm' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill"
payload := strings.NewReader("{\n \"filters\": [\n \"attributes.plan\",\n \"Eq\",\n \"pro\"\n ],\n \"confirm\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": [\n \"attributes.plan\",\n \"Eq\",\n \"pro\"\n ],\n \"confirm\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": [\n \"attributes.plan\",\n \"Eq\",\n \"pro\"\n ],\n \"confirm\": false\n}"
response = http.request(request)
puts response.read_body{
"estimate": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"replay": {
"replayed_days": 15,
"entities": 1,
"judgments_per_month": 1,
"row_units_per_month": 1,
"judgment_units_per_month": 1,
"cost_usd_per_month": 1,
"bulk_pool_share": 1,
"lower_bound": true,
"excludes": [
"fanout"
]
}
}{
"id": "<string>",
"type": "backfill",
"status": "estimating",
"namespace": "<string>",
"spend_usd": 1,
"progress": {
"documents_done": 1
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"judgment": "<string>",
"estimate": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"estimated_completion_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"attribute": "<string>",
"resync": {
"thresholds_before": {},
"thresholds_after": {},
"readers": [
"<string>"
],
"cause": "thresholds"
},
"group": "<string>",
"proposal": {
"options": [
{
"value": "<string>",
"description": "<string>"
}
],
"proposed": [
{
"value": "<string>",
"description": "<string>",
"absorbs": 1,
"sample_ids": [
"<string>"
]
}
],
"sampled": 100,
"escape_documents": 1,
"unlabelled": 1
},
"simulation": {
"population": 1,
"sampled": 1,
"thresholds": {},
"noise": {},
"without_stored_answer": 1,
"examples": [
"<string>"
],
"excluded": {
"failed": 1,
"out_of_scope": 1
},
"fanout": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"larger_sample": 123
},
"version": 2,
"report": {
"documents": 1,
"current": {
"type": "bool",
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"candidate": {
"type": "bool",
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"threshold_flips": {},
"recompute": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
],
"calibration_replay": {
"outcomes": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1
},
"alternative": {
"id": "alt_3f9a2c7e1b04d6a8",
"verdict": "better",
"change": {
"log_loss": {
"mean": 123,
"interval": {
"lower": 123,
"upper": 123
},
"standard_error": 123,
"p": 123
},
"auroc": {
"mean": 123,
"interval": {
"lower": 123,
"upper": 123
},
"standard_error": 123,
"p": 123
},
"accuracy": 123
},
"k": 1,
"drafted": true
}
},
"backfill_job_id": "<string>",
"export": {
"since": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z",
"judgments": [
"<string>"
],
"evaluations": 1,
"files": [
{
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"evaluations": 2,
"bytes": 2
}
],
"expires_at": "2023-11-07T05:31:56Z",
"links_unavailable": "<string>"
},
"result": {
"status": 399,
"body": {
"name": "<string>",
"version": 2,
"path": "included",
"active": true,
"warnings": [
"<string>"
],
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"engine": {
"name": "<string>",
"version": "<string>"
},
"horizon": "0s",
"applies_to": {},
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
]
},
"outcomes": {
"suggested": {
"rules": [
{
"when": {
"path": "attributes.status",
"becomes": "<string>",
"in": [
"<string>"
]
},
"value": true,
"on": "attributes.status",
"from": "attributes.status"
}
],
"implicit_negatives": false
},
"applied": {
"rules": [
{
"when": {
"path": "attributes.status",
"becomes": "<string>",
"in": [
"<string>"
]
},
"value": true,
"on": "attributes.status",
"from": "attributes.status"
}
],
"implicit_negatives": false
},
"plan_required": {
"message": "<string>",
"capability": "outcome_rules",
"required_plan": "team",
"plan": "developer"
},
"message": "<string>"
},
"job_id": "<string>",
"job_ids": [
"<string>"
]
}
},
"warnings": [
{
"code": "taxonomy_drift",
"message": "<string>",
"provider": "typesafe",
"reason": "missing",
"paths": [
"<string>"
],
"thresholds": [
"<string>"
],
"escape_share": 0.5,
"since": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}Estimate a backfill, or run it with confirm
Without confirm, returns the estimate and does nothing. With
confirm: true, starts a job. A backfill judges the documents in its
scope that have no successful answer from the active version for their
current revision, and its estimate counts those, as they are when you
ask. Backfills respect the namespace budget: an estimate that does not
fit the remaining budget is refused. An estimate that
is more than the organization’s balance is refused too, with
details.balance_usd. Both are budget_exceeded. On a prefix
path the backfill covers every namespace under the prefix, each within
its own budget.
A backfill request answers within 20 s. When counting the documents
takes longer, it answers 202 with a backfill_start job, which
finishes the request: the job’s result is then the 200 (the
estimate, or the started backfill job’s id) or the error this
request would have returned.
curl --request POST \
--url https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": [
"attributes.plan",
"Eq",
"pro"
],
"confirm": false
}
'import requests
url = "https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill"
payload = {
"filters": ["attributes.plan", "Eq", "pro"],
"confirm": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filters: ['attributes.plan', 'Eq', 'pro'], confirm: false})
};
fetch('https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'attributes.plan',
'Eq',
'pro'
],
'confirm' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill"
payload := strings.NewReader("{\n \"filters\": [\n \"attributes.plan\",\n \"Eq\",\n \"pro\"\n ],\n \"confirm\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": [\n \"attributes.plan\",\n \"Eq\",\n \"pro\"\n ],\n \"confirm\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brussle.com/v1/namespaces/{ns}/judgments/{name}/backfill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": [\n \"attributes.plan\",\n \"Eq\",\n \"pro\"\n ],\n \"confirm\": false\n}"
response = http.request(request)
puts response.read_body{
"estimate": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"replay": {
"replayed_days": 15,
"entities": 1,
"judgments_per_month": 1,
"row_units_per_month": 1,
"judgment_units_per_month": 1,
"cost_usd_per_month": 1,
"bulk_pool_share": 1,
"lower_bound": true,
"excludes": [
"fanout"
]
}
}{
"id": "<string>",
"type": "backfill",
"status": "estimating",
"namespace": "<string>",
"spend_usd": 1,
"progress": {
"documents_done": 1
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"judgment": "<string>",
"estimate": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"estimated_completion_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"attribute": "<string>",
"resync": {
"thresholds_before": {},
"thresholds_after": {},
"readers": [
"<string>"
],
"cause": "thresholds"
},
"group": "<string>",
"proposal": {
"options": [
{
"value": "<string>",
"description": "<string>"
}
],
"proposed": [
{
"value": "<string>",
"description": "<string>",
"absorbs": 1,
"sample_ids": [
"<string>"
]
}
],
"sampled": 100,
"escape_documents": 1,
"unlabelled": 1
},
"simulation": {
"population": 1,
"sampled": 1,
"thresholds": {},
"noise": {},
"without_stored_answer": 1,
"examples": [
"<string>"
],
"excluded": {
"failed": 1,
"out_of_scope": 1
},
"fanout": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"larger_sample": 123
},
"version": 2,
"report": {
"documents": 1,
"current": {
"type": "bool",
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"candidate": {
"type": "bool",
"mean": 123,
"histogram": [
{
"lower": 123,
"upper": 123,
"count": 1
}
]
},
"threshold_flips": {},
"recompute": {
"documents": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1,
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
]
},
"downstream": [
{
"judgment": "<string>",
"judgments_per_month": 1,
"cost_usd": 1,
"level": 2,
"via": "<string>",
"basis": "history",
"omitted": [
"<string>"
],
"lower_bound": true
}
],
"calibration_replay": {
"outcomes": 1,
"tokens": 1,
"row_units": 1,
"judgment_units": 1,
"cost_usd": 1
},
"alternative": {
"id": "alt_3f9a2c7e1b04d6a8",
"verdict": "better",
"change": {
"log_loss": {
"mean": 123,
"interval": {
"lower": 123,
"upper": 123
},
"standard_error": 123,
"p": 123
},
"auroc": {
"mean": 123,
"interval": {
"lower": 123,
"upper": 123
},
"standard_error": 123,
"p": 123
},
"accuracy": 123
},
"k": 1,
"drafted": true
}
},
"backfill_job_id": "<string>",
"export": {
"since": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z",
"judgments": [
"<string>"
],
"evaluations": 1,
"files": [
{
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z",
"evaluations": 2,
"bytes": 2
}
],
"expires_at": "2023-11-07T05:31:56Z",
"links_unavailable": "<string>"
},
"result": {
"status": 399,
"body": {
"name": "<string>",
"version": 2,
"path": "included",
"active": true,
"warnings": [
"<string>"
],
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"engine": {
"name": "<string>",
"version": "<string>"
},
"horizon": "0s",
"applies_to": {},
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
]
},
"outcomes": {
"suggested": {
"rules": [
{
"when": {
"path": "attributes.status",
"becomes": "<string>",
"in": [
"<string>"
]
},
"value": true,
"on": "attributes.status",
"from": "attributes.status"
}
],
"implicit_negatives": false
},
"applied": {
"rules": [
{
"when": {
"path": "attributes.status",
"becomes": "<string>",
"in": [
"<string>"
]
},
"value": true,
"on": "attributes.status",
"from": "attributes.status"
}
],
"implicit_negatives": false
},
"plan_required": {
"message": "<string>",
"capability": "outcome_rules",
"required_plan": "team",
"plan": "developer"
},
"message": "<string>"
},
"job_id": "<string>",
"job_ids": [
"<string>"
]
}
},
"warnings": [
{
"code": "taxonomy_drift",
"message": "<string>",
"provider": "typesafe",
"reason": "missing",
"paths": [
"<string>"
],
"thresholds": [
"<string>"
],
"escape_share": 0.5,
"since": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {
"reason": "<string>",
"suggested_context": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {},
"previous": {
"fields": [
"<string>"
],
"anchor": "<string>"
}
},
"cost_per_answer": 1,
"whole_state_cost_per_answer": 1,
"sampled_documents": 2,
"excluded": [
{
"path": "<string>",
"reason": "id"
}
]
}
}
}
}Authorizations
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
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.
1 - 255Path Parameters
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.
1 - 256^(?!\.\.?$)[A-Za-z0-9._:/-]+(/\*)?$