Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning centerThe 'Re-Run' endpoint re-triggers a schedule identified by the runId. The response is a new runId, which is a unique value for the specific run.
The initial runId is typically generated from the Run Schedule Now endpoint, which is then used to rerun the same schedule.
This end point can be used to run a schedule with the exact same versions of flows, sub-flows etc. as the original run of the schedule. From a DevOps perspective this can be used to run the exact same version of flows (test cases) against different versions of the code base, regardless of any changes made to the flows in the mean time.
http://{controllerMachine}:{controllerPort}/api/v3/run/39f2b3e3-fa24-43e7-a2d6-38815128ac6c/reRun?var1=val1&var2=val2
In this example the RunId is added as part of the endpoint URL. The value of ‘var1’ and ‘var2’ will be set to ‘val1’ and ‘val2’ respectively, if the variables are defined in the schedule configuration. The schedule variables can be used dynamically in the automation flows, so this is a method to input values and parameters directly to the individual automation flows via the schedule.
A real-life example of this is to trigger a schedule with the URL of the web site, that the automation flow should use in the execution. Creating a URL variable in the schedule and assign different values for the URL will trigger the flows on different web sites.
To understand more about using scheduled variables, please see this blog post: https://www.leapwork.com/services/learning-center/running-same-test-case-in-multiple-environments.
http://{controllerMachine}:{controllerPort}/api/v3/run/{runId}/reRun
Property | Type | Description | Comments |
---|---|---|---|
runId | string | The runId is a unique Id for the individual run instance of a schedule | The runId can be fetched from response body of the Run Schedule Now endpoint. |
curl -X PUT --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http:// {controllerMachine}:{controllerPort} /api/v3/run/39f2b3e3-fa24-43e7-a2d6-38815128ac6c/reRun'
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
$runID="39f2b3e3-fa24-43e7-a2d6-38815128ac6c"
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v3/run/$runID/reRun" -ContentType "application/json" -Headers $headers -Method PUT
RunId of run 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 execution output of flows defined in a schedule. |
200 (OK)
404 (Not Found)
401 (Unauthorized)
400 (Bad Request)
405 (Method Not Allowed)
500 (Internal Server Error)
©2024, Leapwork. All rights reserved.