Agent key only: report hardware, servers, health, filtered engine metrics, and content-free request shapes
POST
/
api
/
v1
/
agent
/
sync
Agent key only: report hardware, servers, health, filtered engine metrics, and content-free request shapes
curl --request POST \
--url http://127.0.0.1:18000/api/v1/agent/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_version": "<string>",
"arch": "<string>",
"hardware": {},
"os": "<string>",
"protocol": "infercrane.agent/v1",
"sent_at": "2023-11-07T05:31:56Z",
"servers": [
{
"address": "<string>",
"authenticated": true,
"key": "<string>",
"metrics_available": true,
"models": [
"<string>"
],
"active_model": "<string>",
"engine_version": "<string>",
"health_detail": "<string>",
"metrics_detail": "<string>"
}
],
"gateway": {},
"metrics": [
{}
],
"traffic": [
{}
]
}
'import requests
url = "http://127.0.0.1:18000/api/v1/agent/sync"
payload = {
"agent_version": "<string>",
"arch": "<string>",
"hardware": {},
"os": "<string>",
"protocol": "infercrane.agent/v1",
"sent_at": "2023-11-07T05:31:56Z",
"servers": [
{
"address": "<string>",
"authenticated": True,
"key": "<string>",
"metrics_available": True,
"models": ["<string>"],
"active_model": "<string>",
"engine_version": "<string>",
"health_detail": "<string>",
"metrics_detail": "<string>"
}
],
"gateway": {},
"metrics": [{}],
"traffic": [{}]
}
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({
agent_version: '<string>',
arch: '<string>',
hardware: {},
os: '<string>',
protocol: 'infercrane.agent/v1',
sent_at: '2023-11-07T05:31:56Z',
servers: [
{
address: '<string>',
authenticated: true,
key: '<string>',
metrics_available: true,
models: ['<string>'],
active_model: '<string>',
engine_version: '<string>',
health_detail: '<string>',
metrics_detail: '<string>'
}
],
gateway: {},
metrics: [{}],
traffic: [{}]
})
};
fetch('http://127.0.0.1:18000/api/v1/agent/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agent/sync"
payload := strings.NewReader("{\n \"agent_version\": \"<string>\",\n \"arch\": \"<string>\",\n \"hardware\": {},\n \"os\": \"<string>\",\n \"protocol\": \"infercrane.agent/v1\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"servers\": [\n {\n \"address\": \"<string>\",\n \"authenticated\": true,\n \"key\": \"<string>\",\n \"metrics_available\": true,\n \"models\": [\n \"<string>\"\n ],\n \"active_model\": \"<string>\",\n \"engine_version\": \"<string>\",\n \"health_detail\": \"<string>\",\n \"metrics_detail\": \"<string>\"\n }\n ],\n \"gateway\": {},\n \"metrics\": [\n {}\n ],\n \"traffic\": [\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))
}{
"accepted": {
"measurements": 123,
"requests": 123
},
"agent_id": "<string>",
"agent_name": "<string>",
"commands": [
{}
],
"poll_interval_seconds": 32,
"rejected": [
{}
],
"servers": [
{
"endpoint": "<string>",
"health": "<string>",
"key": "<string>",
"model": "<string>",
"ownership": "<string>",
"target_id": "<string>",
"traffic_detail": "<string>",
"traffic_source": "none"
}
],
"upgrade": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Body
application/json
One agent sync. May be gzip-encoded; at most 8 MiB decompressed. Unknown fields are ignored within one protocol version.
Response
Success
⌘I
Agent key only: report hardware, servers, health, filtered engine metrics, and content-free request shapes
curl --request POST \
--url http://127.0.0.1:18000/api/v1/agent/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_version": "<string>",
"arch": "<string>",
"hardware": {},
"os": "<string>",
"protocol": "infercrane.agent/v1",
"sent_at": "2023-11-07T05:31:56Z",
"servers": [
{
"address": "<string>",
"authenticated": true,
"key": "<string>",
"metrics_available": true,
"models": [
"<string>"
],
"active_model": "<string>",
"engine_version": "<string>",
"health_detail": "<string>",
"metrics_detail": "<string>"
}
],
"gateway": {},
"metrics": [
{}
],
"traffic": [
{}
]
}
'import requests
url = "http://127.0.0.1:18000/api/v1/agent/sync"
payload = {
"agent_version": "<string>",
"arch": "<string>",
"hardware": {},
"os": "<string>",
"protocol": "infercrane.agent/v1",
"sent_at": "2023-11-07T05:31:56Z",
"servers": [
{
"address": "<string>",
"authenticated": True,
"key": "<string>",
"metrics_available": True,
"models": ["<string>"],
"active_model": "<string>",
"engine_version": "<string>",
"health_detail": "<string>",
"metrics_detail": "<string>"
}
],
"gateway": {},
"metrics": [{}],
"traffic": [{}]
}
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({
agent_version: '<string>',
arch: '<string>',
hardware: {},
os: '<string>',
protocol: 'infercrane.agent/v1',
sent_at: '2023-11-07T05:31:56Z',
servers: [
{
address: '<string>',
authenticated: true,
key: '<string>',
metrics_available: true,
models: ['<string>'],
active_model: '<string>',
engine_version: '<string>',
health_detail: '<string>',
metrics_detail: '<string>'
}
],
gateway: {},
metrics: [{}],
traffic: [{}]
})
};
fetch('http://127.0.0.1:18000/api/v1/agent/sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agent/sync"
payload := strings.NewReader("{\n \"agent_version\": \"<string>\",\n \"arch\": \"<string>\",\n \"hardware\": {},\n \"os\": \"<string>\",\n \"protocol\": \"infercrane.agent/v1\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"servers\": [\n {\n \"address\": \"<string>\",\n \"authenticated\": true,\n \"key\": \"<string>\",\n \"metrics_available\": true,\n \"models\": [\n \"<string>\"\n ],\n \"active_model\": \"<string>\",\n \"engine_version\": \"<string>\",\n \"health_detail\": \"<string>\",\n \"metrics_detail\": \"<string>\"\n }\n ],\n \"gateway\": {},\n \"metrics\": [\n {}\n ],\n \"traffic\": [\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))
}{
"accepted": {
"measurements": 123,
"requests": 123
},
"agent_id": "<string>",
"agent_name": "<string>",
"commands": [
{}
],
"poll_interval_seconds": 32,
"rejected": [
{}
],
"servers": [
{
"endpoint": "<string>",
"health": "<string>",
"key": "<string>",
"model": "<string>",
"ownership": "<string>",
"target_id": "<string>",
"traffic_detail": "<string>",
"traffic_source": "none"
}
],
"upgrade": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}