GET
/
api
/
v1
/
agents
/
{id}
{
  "error": "Agent not found"
}
Retrieve an agent by its ID. Network policies are not included in the agent response.
To get network policies for an agent, use the dedicated network policy endpoints
Requires Bearer token authentication

Path Parameters

id
string
required
ID of agent to return

Example

curl -H "Authorization: Bearer $GARNET_API_TOKEN" \
  "https://api.garnet.ai/v1/agents/550e8400-e29b-41d4-a716-446655440000"

Response

id
string
Unique agent identifier
name
string
Agent name
os
string
Operating system
ip
string
Agent IP address
kind
string
Agent kind
labels
object
Agent labels
last_seen
string
ISO 8601 timestamp of last heartbeat
created_at
string
ISO 8601 timestamp of creation

Error Examples

{
  "error": "Agent not found"
}
{
  "error": "permission denied",
  "type": "UnauthorizedAgent"
}