curl --request PATCH \
--url https://api.vainona.ai/v1/namespaces/{ns} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"budget": {
"compute_usd_per_month": 1
},
"pinned": true,
"default_engine": {
"version": "<string>"
},
"fanout": {
"share": 0.5,
"job_above": 10000,
"confirm_jobs": true
}
}
'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}"
payload = {
"budget": { "compute_usd_per_month": 1 },
"pinned": True,
"default_engine": { "version": "<string>" },
"fanout": {
"share": 0.5,
"job_above": 10000,
"confirm_jobs": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
budget: {compute_usd_per_month: 1},
pinned: true,
default_engine: {version: '<string>'},
fanout: {share: 0.5, job_above: 10000, confirm_jobs: true}
})
};
fetch('https://api.vainona.ai/v1/namespaces/{ns}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'budget' => [
'compute_usd_per_month' => 1
],
'pinned' => true,
'default_engine' => [
'version' => '<string>'
],
'fanout' => [
'share' => 0.5,
'job_above' => 10000,
'confirm_jobs' => true
]
]),
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.vainona.ai/v1/namespaces/{ns}"
payload := strings.NewReader("{\n \"budget\": {\n \"compute_usd_per_month\": 1\n },\n \"pinned\": true,\n \"default_engine\": {\n \"version\": \"<string>\"\n },\n \"fanout\": {\n \"share\": 0.5,\n \"job_above\": 10000,\n \"confirm_jobs\": true\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.vainona.ai/v1/namespaces/{ns}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"budget\": {\n \"compute_usd_per_month\": 1\n },\n \"pinned\": true,\n \"default_engine\": {\n \"version\": \"<string>\"\n },\n \"fanout\": {\n \"share\": 0.5,\n \"job_above\": 10000,\n \"confirm_jobs\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"budget\": {\n \"compute_usd_per_month\": 1\n },\n \"pinned\": true,\n \"default_engine\": {\n \"version\": \"<string>\"\n },\n \"fanout\": {\n \"share\": 0.5,\n \"job_above\": 10000,\n \"confirm_jobs\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"budget": {
"compute_usd_per_month": 1,
"on_exceeded": "pause"
},
"budget_paused": true,
"pinned": true,
"default_engine": {
"name": "jev",
"version": "<string>"
},
"deleting": true,
"stats": {
"documents": 1,
"bytes": 1,
"spend_month_usd": 1,
"periodic_cost_usd_per_month": 1
},
"fanout": {
"share": 0.5,
"job_above": 10000,
"confirm_jobs": true
}
}{
"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": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Change budget, pinning and default engine
Settings are manifest fields (§7.2.8). Raising the budget clears
budget_paused in the same commit.
curl --request PATCH \
--url https://api.vainona.ai/v1/namespaces/{ns} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"budget": {
"compute_usd_per_month": 1
},
"pinned": true,
"default_engine": {
"version": "<string>"
},
"fanout": {
"share": 0.5,
"job_above": 10000,
"confirm_jobs": true
}
}
'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}"
payload = {
"budget": { "compute_usd_per_month": 1 },
"pinned": True,
"default_engine": { "version": "<string>" },
"fanout": {
"share": 0.5,
"job_above": 10000,
"confirm_jobs": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
budget: {compute_usd_per_month: 1},
pinned: true,
default_engine: {version: '<string>'},
fanout: {share: 0.5, job_above: 10000, confirm_jobs: true}
})
};
fetch('https://api.vainona.ai/v1/namespaces/{ns}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'budget' => [
'compute_usd_per_month' => 1
],
'pinned' => true,
'default_engine' => [
'version' => '<string>'
],
'fanout' => [
'share' => 0.5,
'job_above' => 10000,
'confirm_jobs' => true
]
]),
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.vainona.ai/v1/namespaces/{ns}"
payload := strings.NewReader("{\n \"budget\": {\n \"compute_usd_per_month\": 1\n },\n \"pinned\": true,\n \"default_engine\": {\n \"version\": \"<string>\"\n },\n \"fanout\": {\n \"share\": 0.5,\n \"job_above\": 10000,\n \"confirm_jobs\": true\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.vainona.ai/v1/namespaces/{ns}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"budget\": {\n \"compute_usd_per_month\": 1\n },\n \"pinned\": true,\n \"default_engine\": {\n \"version\": \"<string>\"\n },\n \"fanout\": {\n \"share\": 0.5,\n \"job_above\": 10000,\n \"confirm_jobs\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"budget\": {\n \"compute_usd_per_month\": 1\n },\n \"pinned\": true,\n \"default_engine\": {\n \"version\": \"<string>\"\n },\n \"fanout\": {\n \"share\": 0.5,\n \"job_above\": 10000,\n \"confirm_jobs\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"budget": {
"compute_usd_per_month": 1,
"on_exceeded": "pause"
},
"budget_paused": true,
"pinned": true,
"default_engine": {
"name": "jev",
"version": "<string>"
},
"deleting": true,
"stats": {
"documents": 1,
"bytes": 1,
"spend_month_usd": 1,
"periodic_cost_usd_per_month": 1
},
"fanout": {
"share": 0.5,
"job_above": 10000,
"confirm_jobs": true
}
}{
"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": {}
}
}{
"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._:/-]+$Body
Null removes the budget.
Show child attributes
Show child attributes
Keep the namespace resident in cache on two nodes, billed as warm storage.
Fills in engine on judgment create when omitted; never changes existing judgments. Null removes it.
Show child attributes
Show child attributes
Entities, E3a (§6.11). How fan-out (§6.5.2) runs in this namespace.
Every key is optional in a PATCH, and the others keep their values.
Show child attributes
Show child attributes
Response
The namespace with the new settings.
Up to 256 bytes. / separates levels of the hierarchy, as in acme/prod/tenant_123.
1 - 256^[A-Za-z0-9._:/-]+$RFC 3339, UTC.
Show child attributes
Show child attributes
True while evaluation is paused by the budget.
An exact engine version. No aliases.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Entities, E3a (§6.11). The fan-out settings in effect, every key present.
Show child attributes
Show child attributes