curl --request POST \
--url https://api.example.com/v1/annotation-schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"json_schema": "<string>",
"description": "<string>",
"promoted_fields": [
{
"field": "<string>",
"identity": true,
"bloom": true,
"slot": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v1/annotation-schemas"
payload = {
"name": "<string>",
"json_schema": "<string>",
"description": "<string>",
"promoted_fields": [
{
"field": "<string>",
"identity": True,
"bloom": True,
"slot": "<string>"
}
]
}
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({
name: '<string>',
json_schema: '<string>',
description: '<string>',
promoted_fields: [{field: '<string>', identity: true, bloom: true, slot: '<string>'}]
})
};
fetch('https://api.example.com/v1/annotation-schemas', 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.example.com/v1/annotation-schemas",
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([
'name' => '<string>',
'json_schema' => '<string>',
'description' => '<string>',
'promoted_fields' => [
[
'field' => '<string>',
'identity' => true,
'bloom' => true,
'slot' => '<string>'
]
]
]),
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.example.com/v1/annotation-schemas"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"json_schema\": \"<string>\",\n \"description\": \"<string>\",\n \"promoted_fields\": [\n {\n \"field\": \"<string>\",\n \"identity\": true,\n \"bloom\": true,\n \"slot\": \"<string>\"\n }\n ]\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.example.com/v1/annotation-schemas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"json_schema\": \"<string>\",\n \"description\": \"<string>\",\n \"promoted_fields\": [\n {\n \"field\": \"<string>\",\n \"identity\": true,\n \"bloom\": true,\n \"slot\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/annotation-schemas")
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 \"name\": \"<string>\",\n \"json_schema\": \"<string>\",\n \"description\": \"<string>\",\n \"promoted_fields\": [\n {\n \"field\": \"<string>\",\n \"identity\": true,\n \"bloom\": true,\n \"slot\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schema": {
"id": "<string>",
"name": "<string>",
"version": "<string>",
"description": "<string>",
"json_schema": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"promoted_fields": [
{
"field": "<string>",
"identity": true,
"bloom": true,
"slot": "<string>"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}Post v1annotation schemas
Register a schema config in the caller’s organization. An unseen name starts at version 1; an existing name creates the next version after a backward-compatibility check against the latest live version (an incompatible change is rejected). Registering content identical to the latest live version returns that version unchanged instead of creating a new one, so retrying a register is always safe.
curl --request POST \
--url https://api.example.com/v1/annotation-schemas \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"json_schema": "<string>",
"description": "<string>",
"promoted_fields": [
{
"field": "<string>",
"identity": true,
"bloom": true,
"slot": "<string>"
}
]
}
'import requests
url = "https://api.example.com/v1/annotation-schemas"
payload = {
"name": "<string>",
"json_schema": "<string>",
"description": "<string>",
"promoted_fields": [
{
"field": "<string>",
"identity": True,
"bloom": True,
"slot": "<string>"
}
]
}
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({
name: '<string>',
json_schema: '<string>',
description: '<string>',
promoted_fields: [{field: '<string>', identity: true, bloom: true, slot: '<string>'}]
})
};
fetch('https://api.example.com/v1/annotation-schemas', 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.example.com/v1/annotation-schemas",
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([
'name' => '<string>',
'json_schema' => '<string>',
'description' => '<string>',
'promoted_fields' => [
[
'field' => '<string>',
'identity' => true,
'bloom' => true,
'slot' => '<string>'
]
]
]),
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.example.com/v1/annotation-schemas"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"json_schema\": \"<string>\",\n \"description\": \"<string>\",\n \"promoted_fields\": [\n {\n \"field\": \"<string>\",\n \"identity\": true,\n \"bloom\": true,\n \"slot\": \"<string>\"\n }\n ]\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.example.com/v1/annotation-schemas")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"json_schema\": \"<string>\",\n \"description\": \"<string>\",\n \"promoted_fields\": [\n {\n \"field\": \"<string>\",\n \"identity\": true,\n \"bloom\": true,\n \"slot\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/annotation-schemas")
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 \"name\": \"<string>\",\n \"json_schema\": \"<string>\",\n \"description\": \"<string>\",\n \"promoted_fields\": [\n {\n \"field\": \"<string>\",\n \"identity\": true,\n \"bloom\": true,\n \"slot\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"schema": {
"id": "<string>",
"name": "<string>",
"version": "<string>",
"description": "<string>",
"json_schema": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"promoted_fields": [
{
"field": "<string>",
"identity": true,
"bloom": true,
"slot": "<string>"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": {
"quota": {
"metric": "<string>",
"limit": 123,
"current": 123,
"reserved": 123,
"retry_after_seconds": 123
}
},
"request_id": "<string>"
}Authorizations
Hiloop API key sent as an HTTP Bearer token.
Body
The schema name — unique per organization across versions. A new registration of an existing name creates the next version; an unseen name starts at version 1.
The JSON Schema document (draft 2020-12) as a JSON string. Must be a JSON object.
An optional human-readable description for this version.
The payload fields to promote into typed columns for this version. The caller sets field/type/identity/bloom; the server assigns each field's slot, keeping a previously promoted field's slot and type. Registration is rejected if a field re-declares a different type, or if the schema has bound more fields of a type, across all its versions, than the slot pool holds.
Show child attributes
Show child attributes
Response
OK
The registered config version.
Show child attributes
Show child attributes