Inspect one agent and the servers observed through it
GET
/
api
/
v1
/
agents
/
{id}
Inspect one agent and the servers observed through it
curl --request GET \
--url http://127.0.0.1:18000/api/v1/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:18000/api/v1/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:18000/api/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agents/{id}"
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))
}{
"agent": {
"agent_version": "<string>",
"arch": "<string>",
"connection": "never_connected",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"gateway_server_key": "<string>",
"hardware": "<unknown>",
"id": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"os": "<string>",
"protocol": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"servers": "<unknown>",
"state": "active",
"updated_at": "2023-11-07T05:31:56Z"
},
"observed_servers": [
{
"address": "<string>",
"endpoint": "<string>",
"engine": "<string>",
"health": "<string>",
"key": "<string>",
"model": "<string>",
"ownership": "observe-only",
"reported_at": "2023-11-07T05:31:56Z",
"target_id": "<string>",
"traffic_detail": "<string>",
"traffic_source": "none"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
⌘I
Inspect one agent and the servers observed through it
curl --request GET \
--url http://127.0.0.1:18000/api/v1/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://127.0.0.1:18000/api/v1/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://127.0.0.1:18000/api/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/agents/{id}"
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))
}{
"agent": {
"agent_version": "<string>",
"arch": "<string>",
"connection": "never_connected",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"gateway_server_key": "<string>",
"hardware": "<unknown>",
"id": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"os": "<string>",
"protocol": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"servers": "<unknown>",
"state": "active",
"updated_at": "2023-11-07T05:31:56Z"
},
"observed_servers": [
{
"address": "<string>",
"endpoint": "<string>",
"engine": "<string>",
"health": "<string>",
"key": "<string>",
"model": "<string>",
"ownership": "observe-only",
"reported_at": "2023-11-07T05:31:56Z",
"target_id": "<string>",
"traffic_detail": "<string>",
"traffic_source": "none"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}