curl --request POST \
--url https://api.vainona.ai/v1/jobs/{id}/confirm \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/jobs/{id}/confirm"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/jobs/{id}/confirm', 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.vainona.ai/v1/jobs/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vainona.ai/v1/jobs/{id}/confirm"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.vainona.ai/v1/jobs/{id}/confirm")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/jobs/{id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1
},
"estimated_completion_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"attribute": "<string>",
"referenced": {
"relation": "<string>",
"document_id": "<string>",
"revision": 1
},
"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,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Start a job in awaiting_confirm
curl --request POST \
--url https://api.vainona.ai/v1/jobs/{id}/confirm \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/jobs/{id}/confirm"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/jobs/{id}/confirm', 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.vainona.ai/v1/jobs/{id}/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vainona.ai/v1/jobs/{id}/confirm"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.vainona.ai/v1/jobs/{id}/confirm")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/jobs/{id}/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1
},
"estimated_completion_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"attribute": "<string>",
"referenced": {
"relation": "<string>",
"document_id": "<string>",
"revision": 1
},
"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,
"judgment_units": 1,
"cost_usd": 1,
"duration_s": 1
}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}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
Returns the original response verbatim while the node still caches it. Correctness never depends on it.
1Path Parameters
1Response
The job.
A job row (§7.10.5). A shadow job comes from activating a differing
version without force (§6.9). It starts in awaiting_confirm and
runs its sample while it waits; report fills in when the sample is
done. confirm activates version and the job ends done; cancel
leaves the active version unchanged. On a template prefix, namespace
is the prefix. A reference_index job (entities, E1) builds the index
an entity judgment's relations need (§6.5.2); it starts running, and
attribute names the attribute it indexes. A fanout job (entities,
E3a) re-judges the judged documents one referenced change touches
(§6.9): referenced names the change and estimate its cost. It
waits in awaiting_confirm unless the judgment's
fanout.confirm_jobs is false. confirm is budget_exceeded when
the estimate does not fit what is left of the namespace's budget, and
cancel leaves the in-scope answers stale.
backfill, shadow, periodic, namespace_delete, reference_index, fanout estimating, awaiting_confirm, running, paused, done, failed, cancelled 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 (§7.7). Up to 256 bytes.
1 - 256^[A-Za-z0-9._:/-]+(/\*)?$Judging billed by this job so far, in US dollars.
x >= 0Show child attributes
Show child attributes
RFC 3339, UTC.
RFC 3339, UTC.
A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..
1 - 128^[A-Za-z0-9_-]+$Show child attributes
Show child attributes
RFC 3339, UTC.
Entities, E1 (§6.5.2). reference_index jobs only, as attributes.<name>. The attribute whose reference index the job builds. Null for other jobs.
^attributes\.[A-Za-z0-9_-]+$Entities, E3a (§6.9). fanout jobs only; null for other jobs.
Show child attributes
Show child attributes
Shadow jobs only. The version being activated.
x >= 1Shadow jobs only. Null while the sample runs; progress counts the
sampled documents. A composite version's job has a
CompositeShadowReport (§6.5.1), and when it has too few labels it
fails with an error that starts with insufficient_labels.
- Option 1
- Option 2
Show child attributes
Show child attributes