Contact
info-emea@leapwork.com
+45 35 25 14 14
+45 35 25 14 14
Leapwork ApS
Esplanaden 8C,
1263 Copenhagen K,
Denmark
Find tutorials, guides and use case examples in the
Learning centerThe Run flow by Id endpoint runs a flow on an agent by creating a temporary schedule, using flow InfoId and environment ID. The response is a runId, which is a unique value for a specific run of the triggered schedule.
InfoID can be fetched by passing flowId to Get Hierarchy endpoint.
This endpoint can be used to rerun failed tests or a single test on a specific agent.
http://{controllerMachine}:{controllerPort}/api/v3/flows/39f2b3e3-fa24-43e7-a2d6-38815128ac6c/environment/69f7b3e7-ha24-83e7-a2d6-98895128vc6z?var1=val1&var2=val2
From the previous endpoint example, if the variables are defined in the schedule configuration, the value of var1 and var2 will be set to val1 and val2. Schedule variables can be used dynamically in automation flows. This method is used to input values and parameters directly into the individual automation flows via the schedule.
http://{controllerMachine}:{controllerPort}/api/v3/flows/{infoId}/environment/{environmentId}
Property | Type | Description | Comments |
---|---|---|---|
InfoId | string | Unique identifier for a flow | A user can pass flowId to Get Hierarchy endpoint and get the InfoId |
environmentId | string | Unique identifier for a environment | It can be fetched by right-clicking on an agent and by clicking Get Id |
curl -X PUT --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http:// {controllerMachine}:{controllerPort} /api/v3/flows/39f2b3e3-fa24-43e7-a2d6-38815128ac6c/environment/69f7b3e7-ha24-83e7-a2d6-98895128vc6z'
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v3/flows/39f2b3e3-fa24-43e7-a2d6-38815128ac6c/environment/69f7b3e7-ha24-83e7-a2d6-98895128vc6z" -ContentType "application/json" -Headers $headers -Method PUT
The schedule RunId is returned in response:
{ |
Field | Type | Description | Comments |
---|---|---|---|
runId | string | The runId is a unique Id for the individual run instance of a schedule | runId can be used to fetch information about the execution output of flows defined in a schedule. |
List of response codes:
200 (OK)
404 (Not Found)
401 (Unauthorized)
400 (Bad Request)
405 (Method Not Allowed)
500 (Internal Server Error)
Leapwork ApS
Esplanaden 8C,
1263 Copenhagen K,
Denmark
©2022, LEAPWORK. All rights reserved. Legal