Get Agent's Status

Description

'Get Agent Status by Id' returns complete information about an agent's connection status (can it be connected or not) selected by the {agentId}.

Request URL

(GET) http://{controllerMachine}:{controllerPort}/api/v4/agents/agentStatus/{agentId}


Input parameters

Field

Type

Description

Comment

accessKey

string

An access key is required to restrict unauthorized access to the API.

Access Key should include agent scope to access the API.

agentId

string

Unique id of agent

 

Examples

Curl

curl -X GET --header 'Accept: application/json' --header 'accessKey: RPqwNoQTn38dERIC' 'http://localhost:9001/api/v4/agents/agentStatus/1a8d0f39-ce50-4a35-bed1-770b4de3f957'

PowerShell 

$headers = @{}
$headers.Add("
accessKey","RPqwNoQTn38dERIC")
Invoke-WebRequest -Uri "
http://localhost:9001/agentStatus/1a8d0f39-ce50-4a35-bed1-770b4de3f957" -ContentType "application/json" -Headers $headers -Method GET

Response

Agent’s connection details returned in the response.

{

   "$id": "1",

   "AgentId": "1a8d0f39-ce50-4a35-bed1-770b4de3f957",

   "Title": "Remote Agent",

   "Host": "ec2-18-194-110-160.eu-central-1.compute.amazonaws.com",

   "Port": 6777,

   "ConnectionStatus": "Unavailable",

   "BlockedByLicense": "Disabled"

}

Field

Type

Description

Values

$id

string

ID of internal object

 

AgentId

string

Unique Id of Agent

 

Title

string

Name of the agent

 

Host

string

Hostname

 

Port

numeric

Port

 

ConnectionStatus

string

Agent’s connection status

Available, Unavailable

BlockedByLicense

string

Agent’s license state

Available, Disabled

 

Response Code

200 (OK)

401 (Unauthorized - eg: “Incorrect Accesskey”)

403 (Forbidden – eg: “AccessKey does not have the relevant scope permission”)

500 (Internal Server Error)