curl --request POST \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/detach \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/detach"
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/namespaces/{ns}/judgments/{name}/detach', 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/namespaces/{ns}/judgments/{name}/detach",
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/namespaces/{ns}/judgments/{name}/detach"
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/namespaces/{ns}/judgments/{name}/detach")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/detach")
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{
"name": "<string>",
"active_version": 2,
"freshness": {
"policy": "on_read",
"debounce_ms": 0,
"interval": "<string>",
"max_wait_ms": 2,
"fanout": {
"scope": {
"created_within": "<string>",
"where": {}
},
"debounce_ms": 600000,
"max_wait_ms": 2,
"job_above": 1,
"confirm_jobs": true,
"auto_daily_limit": 100000
}
},
"thresholds": {},
"versions": [
{
"version": 2,
"created_at": "2023-11-07T05:31:56Z",
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {}
},
"engine": {
"name": "jev",
"version": "<string>"
},
"horizon": "0s",
"applies_to": {},
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
]
}
}
],
"template": "<string>",
"overrides": [
"thresholds"
],
"fanout_sources": {
"scope": {
"created_within": "judgment",
"where": "judgment"
},
"debounce_ms": "judgment",
"max_wait_ms": "judgment",
"job_above": "judgment",
"confirm_jobs": "judgment",
"auto_daily_limit": "judgment"
}
}{
"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": {}
}
}Detach an inherited judgment from its template
Turns a judgment the namespace inherits from a template into an ordinary judgment of the namespace, a copy of the current version (§7.7). The copy keeps the template’s version numbers, up to and including the active version, which stays active, so existing answers still name a version the judgment has. Its thresholds and freshness settings are the ones the namespace had, override or inherited. It no longer follows the template. Answers and evaluations stay where they are. Detaching a judgment the namespace already owns changes nothing and returns it, so a retry is safe. Takes no body.
curl --request POST \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/detach \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/detach"
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/namespaces/{ns}/judgments/{name}/detach', 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/namespaces/{ns}/judgments/{name}/detach",
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/namespaces/{ns}/judgments/{name}/detach"
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/namespaces/{ns}/judgments/{name}/detach")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/detach")
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{
"name": "<string>",
"active_version": 2,
"freshness": {
"policy": "on_read",
"debounce_ms": 0,
"interval": "<string>",
"max_wait_ms": 2,
"fanout": {
"scope": {
"created_within": "<string>",
"where": {}
},
"debounce_ms": 600000,
"max_wait_ms": 2,
"job_above": 1,
"confirm_jobs": true,
"auto_daily_limit": 100000
}
},
"thresholds": {},
"versions": [
{
"version": 2,
"created_at": "2023-11-07T05:31:56Z",
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {}
},
"engine": {
"name": "jev",
"version": "<string>"
},
"horizon": "0s",
"applies_to": {},
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
]
}
}
],
"template": "<string>",
"overrides": [
"thresholds"
],
"fanout_sources": {
"scope": {
"created_within": "judgment",
"where": "judgment"
},
"debounce_ms": "judgment",
"max_wait_ms": "judgment",
"job_above": "judgment",
"confirm_jobs": "judgment",
"auto_daily_limit": "judgment"
}
}{
"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
The namespace name, with any / sent as %2F.
Up to 256 bytes. / separates levels of the hierarchy, as in acme/prod/tenant_123.
1 - 256^[A-Za-z0-9._:/-]+$A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..
1 - 128^[A-Za-z0-9_-]+$Response
The judgment, now the namespace's own.
A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..
1 - 128^[A-Za-z0-9_-]+$Null once the judgment is deactivated.
x >= 1Settings, not part of the definition. Changing them creates no version.
Show child attributes
Show child attributes
The judgment's named thresholds, a setting rather than part of a
version (§6.5). 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),
and {value, gte} for a choice judgment (true when dist[value] is at
least gte). They are evaluated at read time against the raw fields,
never the calibrated ones. A threshold that does not fit the
judgment's type is invalid_request.
Show child attributes
Show child attributes
Every version, oldest first. Versions are retained forever.
Show child attributes
Show child attributes
Present when the judgment is inherited, the template prefix it comes from, such as acme/prod/* (§7.7).
1 - 256^[A-Za-z0-9._:/-]+(/\*)?$Present when the judgment is inherited. The settings this namespace overrides; the others follow the template (§7.7).
thresholds, freshness Entities, E3a (§6.5.2). Where each value in freshness.fanout comes
from, key for key. Present exactly when freshness.fanout is. 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.
Show child attributes
Show child attributes