API: Agents
This section explains how to list, inspect, and update agents via the API.
List Agents
Retrieve all agents, or filter by active/inactive state.
All agents:
| GET /api/v1/agents HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
|
Active agents only:
| GET /api/v1/agents/active HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
|
Inactive agents only:
| GET /api/v1/agents/inactive HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
|
Get Agent Details
Fetch full information for a specific agent.
| GET /api/v1/agents/{AGENT_GUID} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
|
Mark Agent as Inactive
Move a connected agent to the inactive list.
| PUT /api/v1/agents/{AGENT_GUID}/inactive HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
|
Update Agent
You can add or update metadata and custom properties for an agent or modify other agent aspects.
Update metadata
| PUT /api/v1/agents/{AGENT_GUID}/metadata HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json
{
"username": "exampleUser",
"proc": "exampleProcess",
"pid": 2222,
"workingDir": "exampleDir",
"os": 2,
"os_major": 2,
"os_minor": 2,
"ips": "exampleIP",
"hostname": "exampleHost",
"customProperties": {
"key": "value"
}
}
|
Clear agent command queue
| POST /api/v1/agents/{AGENT_GUID}/commands/queue/clear HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
|
Info
Replace all example values with the actual data for the agent you are updating.