Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning center'Get All Agent Statuses' returns complete information about all agent’s connection status (can it be connected or not).
(GET) http://{controllerMachine}:{controllerPort}/api/v4/agents/agentsStatuses
Field | Type | Description | Comment |
---|---|---|---|
accessKey | string | An access key is required to restrict unauthorized access to the API. | The Access Key should include an Agent scope to access the API. |
curl -X GET --header 'Accept: application/json' --header 'accessKey: RPqwNoQTn38dERIC' 'http://localhost:9001/api/v4/agents/agentsStatuses'
$headers = @{}
$headers.Add("accessKey","RPqwNoQTn38dERIC")
Invoke-WebRequest -Uri "http://localhost:9001/api/v4/agents/agentsStatuses" -ContentType "application/json" -Headers $headers -Method GET
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 |
200 (OK)
401 (Unauthorized - eg: “Incorrect Accesskey”)
403 (Forbidden – eg: “AccessKey does not have the relevant scope permission”)
500 (Internal Server Error)
©2024, Leapwork. All rights reserved.