curl --request GET \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}"
req, _ := http.NewRequest("GET", 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.get("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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": {}
}
}Get all versions, the active version and thresholds
curl --request GET \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}"
req, _ := http.NewRequest("GET", 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.get("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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": {}
}
}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.
Path Parameters
A namespace name, or a template prefix ending in /* (§7.7), 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 (§7.7). Up to 256 bytes.
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.
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