Create Gridlastic

Description

The endpoint Create Gridlastic is used to create an Agent of Gridlastic type in LEAPWORK. After the successful creation of a Gridlastic Agent, the Id of the agent is returned in the response.

The details of the created agent can be validated with the help of the Get Agent by Id endpoint.

Request URL

http://{controllerMachine}:{controllerPort}/api/v4/agents/create/gridlastic

Input parameters

Property Type Description Comments
requestBody application/json

Unique identifiers for the Gridlastic Agent comprising the following parameters:

  • Port
  • Title
  • Description
  • HubUserName
  • SubDomain
  • HubPassword
  • OSType
  • OSVersion
  • Browser
  • BrowserVersion

Kindly refer to the Agents documentation for more details on the usage.

 

Examples

Curl


curl -X PUT --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' -d '{ \
"Port": "80", \
"Title": "My Gridlastic Agent", \
"Description": "Gridlastic  Agent", \
"HubUserName": "LeapworkUser", \
"SubDomain": "domainName", \
"HubPassword": "Password", \
"OSType": "Windows", \
"OSVersion": "10", \
"Browser": "Chrome", \
"BrowserVersion": "latest"

}' 'http://{controllerMachine}:{controllerPort}/api/v4/agents/create/gridlastic'

PowerShell 

$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")

$requestBody = @'
{
    "Port": "80",
    "Title": "My Gridlastic Agent",
    "Description": "Gridlastic Agent",
    "HubUserName": "LeapworkUser",
    "SubDomain": "domainName",
    "HubPassword": "Password",
   
"OSType": "Windows",
    "OSVersion": "10",
    "Browser": "Chrome",
    "BrowserVersion": "latest"

}
'@ 

Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/agents/create/gridlastic" -ContentType "application/json" -Headers $headers -Method PUT  -Body $requestBody

Response Body

CreateAgentResponse object:

{

  "$id": "1",

  "AgentId": "4d9c09fe-7ced-4494-8841-378491ebc899"

}

 

Response Object

Field Type Description Values
$id String ID of the internal item (Folder/ Flow/Element etc.)  
AgentId String ID of the Agent created  


Response Code

200 (OK)

404 (Not Found)

401 (Incorrect Access Key)

400 (Bad Request, asset not found)

500 (Internal Server Error)