Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning centerThe 'Stop Schedule by Run ID' endpoint stops an already running schedule identified by its RunId. The RunId is a unique Id for the individual instance run of a schedule. On the successful stop of a run, the end-point will return ‘true’ in the Response Body.
The RunId is generated from the Run Schedule Now endpoint.
http://{controllerMachine}:{controllerPort}/api/v4/schedules/{runId}/stop
Field | Type | Description | Comment |
---|---|---|---|
runId | string | The runId is a unique Id for the individual run instance of a schedule | The runId can be fetched from the Response Body of the Run Schedule Now endpoint. |
curl -X PUT --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http://{controllerMachine}:{controllerPort}/api/v4/schedules/39f2b3e3-fa24-43e7-a2d6-38815128ac6c/stop'
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
$ScheduleID="39f2b3e3-fa24-43e7-a2d6-38815128ac6c"
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/schedules/$ScheduleID/stop" -ContentType "application/json" -Headers $headers -Method PUT
Returns true after stopping the schedule
{ "$id": "1", "OperationCompleted": true } |
Field | Type | Description | Values |
---|---|---|---|
OperationCompleted | string | Returns ‘true’ if schedule is stopped else ‘false’ | true, false |
200 (OK)
404 (Not Found)
401 (Unauthorized)
400 (Bad Request)
405 (Method Not Allowed)
500 (Internal Server Error)
©2024, Leapwork. All rights reserved.