Get Agent By Id

Description

'Get Agent By Id returns all information about an Agent selected by the {agentId}. On success, the returned response contains information like: ‘Agent Title’, ‘Id’, ‘DateModify’, ‘DateCreation’, ‘IsEnabled’ etc.

Request URL

http://{controllerMachine}:{controllerPort}/api/v4/agent/{agentId}

Optional request parameters

http://{controllerMachine}:{controllerPort}/api/v4/agent/{agentId}?temporary=true
if “temporary=true” parameter is set then agents will get the temporary schedules 

Input parameters

Property Type Description Comments
agentId string Unique identifier for an agent agentId can be fetched from response body of Get All Agents endpoint

Examples

Curl


curl -X GET --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http://{controllerMachine}:{controllerPort}/api/v4/agents/{agentId}'

PowerShell 

$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/agents/{agentId}" -ContentType "application/json" -Headers $headers -Method GET

Response Body

Agent object:

{

  "$id": "1",

  "UsedBySchedules": [

    {

      "$id": "2",

      "ScheduleId": "5fe6164e-017b-45c8-adc5-8d7e7b560bd4",

      "ScheduleTitle": "Test"

    }

  ],

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

  "Port": 6777,

  "DisplayWidth": 1280,

  "DisplayHeight": 1024,

  "ConnectionTimeout": 10000,

  "ConnectionType": "RemoteAgent",

  "DateCreation": {

    "$id": "3",

    "Value": "2018-12-04T07:51:03.4600097+00:00",

    "LocalDateTime": "2018-12-04T13:21:03.4600097",

    "UtcDateTime": "2018-12-04T07:51:03.4600097",

    "Ticks": 636795066634600100

  },

  "DateModify": {

    "$id": "4",

    "Value": "2018-12-04T07:51:03.4600097+00:00",

    "LocalDateTime": "2018-12-04T13:21:03.4600097",

    "UtcDateTime": "2018-12-04T07:51:03.4600097",

    "Ticks": 636795066634600100

  },

  "Title": "Amazon WS2016",

  "Type": "Environment",

  "Id": "527653f0-f239-4173-9d5d-07a2184eb646"

}

 

Response Object

Field Type Description Values
$id String ID of internal item(Folder/ Flow/Element etc.)  
Title String Title of item  
Type String Type of item 'Folder','Flow','SubFlow','InteractiveImage',
'DesktopElement','WebElement','DataFile'
'InteractiveImageCollection'
IsDeleted Bool true/false   
DateCreation DapperDateTimeOffset Item Creation date  
DateModify DapperDateTimeOffset Item Modification date  
DapperDateTimeOffset Object Object holds values for DateCreation and DateModify "$id","Value","LocalDateTime",
"UtcDateTime","Ticks"
Description String    
ConnectionType String   Type of Agent example remoteAgent
ConnectionTimeout Int    
IsDisabled bool    
IsAvailable bool    
LocalIdentifier string    
IsWebLocal Bool    
PixelRatio Int    
MobileDeviceOrientation String   portrait/landacape
MobileDevice String    
OSVersion String    
OS String    
OSType String    
UserName String    
UserProfile String    
UserAgent String    
BrowserVersion String    
BrowserHeight Int    
BrowserWidth Int    
Browser String    
Display Int    
DisplayHeight Int    
DisplayWidth Int    
Port Int    
HostName String    
UsedBySchedules Object List of schedule using the agents List of {ScheduleId and ScheduleTitle}


Response Code

200 (OK)

404 (Not Found)

401 (Incorrect Access Key)

400 (Bad Request, asset not found)

500 (Internal Server Error)