Skip to content

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 with the v1 endpoints.

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}

Search Agents (v2)

Use GET /api/v2/agents for a paged, filtered list. Its items are agent records with creation and latest-update events. See the shared pagination response.

GET /api/v2/agents?page=0&pageSize=50&status=ACTIVE&metadataOs=WINDOWS&sort=LAST_CALLBACK_TIME:DESC HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Parameter Description
page, pageSize Zero-based page (default 0) and items per page (default 100, range 1–1000)
status Repeatable: ACTIVE, INACTIVE, or BLOCKED; omitted means all statuses
metadataOs Repeatable: WINDOWS, LINUX, BSD, or MAC
metadataOsArch Repeatable: X86, X64, ARM32, or ARM64
recentListenerId Repeatable positive listener ID
firstRegistrationTimeSince, firstRegistrationTimeBefore Inclusive lower and exclusive upper bounds for first registration
lastCallbackTimeSince, lastCallbackTimeBefore Inclusive lower and exclusive upper bounds for latest callback
sort Repeatable sort field, optionally followed by :ASC or :DESC

Sort fields are GUID, FIRST_REGISTRATION_TIME, LAST_CALLBACK_TIME, STATUS, METADATA_OS, METADATA_IPS, METADATA_OS_ARCH, and METADATA_USERNAME. Time bounds are truncated to seconds. An equal or reversed Since/Before pair matches no agents. Older From/To time filters are deprecated; To includes its named second.


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}

Block an Agent

Block an agent from communicating with the server.

PUT /api/v1/agents/{AGENT_GUID}/block HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Restore an Agent

Return a blocked or inactive agent to active status.

PUT /api/v1/agents/{AGENT_GUID}/restore HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Update Several Agent Statuses

Set several agents to the same ACTIVE, INACTIVE, or BLOCKED status in one request. agentGuids must contain 1–500 unique UUIDs. This operation requires the MANAGE_AGENTS authority.

1
2
3
4
5
6
7
8
PATCH /api/v1/agents/status HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json

{
  "status": "INACTIVE",
  "agentGuids": ["3a698332-53cd-4059-a479-f130c7b1ff13", "d649b796-cb39-489f-93f8-d0bc3f0a1525"]
}

List Agent Command Templates

Retrieve command templates that are available for a specific agent.

GET /api/v1/agents/{AGENT_GUID}/command-templates HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

List Agent Commands

Retrieve all commands that have been created for a specific agent, keyed by command ID. Each value follows the same shape as GET /api/v1/commands/{COMMAND_ID}.

GET /api/v1/agents/{AGENT_GUID}/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Response is a JSON object of the form { "<commandId>": { ...CommandResponse }, ... }.


Update Agent

You can add or update metadata and custom properties for an agent or modify other agent aspects.

Update metadata

All fields are optional. Only the fields present in the request body are updated; omitted fields are left unchanged.

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": "C:\\exampleDir",
  "os": "WINDOWS",
  "osMajor": 10,
  "osMinor": 0,
  "ips": "192.168.1.100",
  "hostname": "WORKSTATION01",
  "processArch": "X64",
  "osArch": "X64",
  "ansiCodePage": 1252,
  "integrity": "High",
  "agentType": "myagent",
  "agentVersion": 1,
  "customProperties": {
    "key": "value"
  }
}

Field reference for metadata update

Field Type Description
username string Username running the agent process.
proc string Process name of the agent.
pid integer Process ID.
workingDir string Working directory of the agent process.
os string Operating system. Values: WINDOWS, LINUX, BSD, MAC.
osMajor integer (byte) OS major version number.
osMinor integer (byte) OS minor version number.
ips string IP address(es) of the agent machine.
hostname string Hostname of the agent machine.
processArch string Architecture of the agent process. Values: X86, X64, ARM32, ARM64.
osArch string Architecture of the OS. Values: X86, X64, ARM32, ARM64.
ansiCodePage integer Windows ANSI code page (Windows only).
integrity string Process integrity level (e.g. System, High, Medium, Low).
agentType string Agent type / codename identifier.
agentVersion integer Agent build version number.
customProperties object Arbitrary key-value pairs attached to the agent. Replaces the existing map.

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.