Error
A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"percent": 50,
"current_step": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"result": {},
"errors": {},
"meta": {
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
}
],
"current_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"next_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"previous_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"first_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"last_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
}
}
}Workflow
End the current step
Ends just the current running step (sets state to finished with
duration), without advancing to the next step or ending the run.
GET
/
workflow
/
run
/
{run_id}
/
end_step
End the current step
curl --request GET \
--url {protocol}://{host}:{port}/workflow/run/{run_id}/end_step \
--header 'X-Auth: <api-key>'import requests
url = "{protocol}://{host}:{port}/workflow/run/{run_id}/end_step"
headers = {"X-Auth": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth': '<api-key>'}};
fetch('{protocol}://{host}:{port}/workflow/run/{run_id}/end_step', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{protocol}://{host}:{port}/workflow/run/{run_id}/end_step",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{protocol}://{host}:{port}/workflow/run/{run_id}/end_step"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{protocol}://{host}:{port}/workflow/run/{run_id}/end_step")
.header("X-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("{protocol}://{host}:{port}/workflow/run/{run_id}/end_step")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["X-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"percent": 50,
"current_step": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"result": {},
"errors": {},
"meta": {
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
}
],
"current_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"next_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"previous_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"first_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
},
"last_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"step_order": 123,
"timing_avg_ms": 123,
"timing_min_ms": 123,
"timing_max_ms": 123,
"label": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"number_of_steps": 123,
"current_duration": 123
}
}
}Authorizations
Service-to-service API key
Headers
Required API key permission: valid (informational only -- enforced server-side)
Path Parameters
UUID of the workflow run
Response
Step ended
Workflow run record (from WorkflowRunModel.to_dict())
Run UUID
Workflow type (e.g., sage, sage-nc)
Current state of the workflow run:
queued-- created but not yet startedrunning-- actively executing stepsfinished-- all steps completed successfullyfailed-- a step failed or out-of-order transitioncanceled-- manually cancelled
Available options:
queued, running, finished, failed, canceled Progress percentage
Required range:
0 <= x <= 100ID of the currently running step (null when ended)
When the run was created
When the run ended (null if still running)
Total run duration in milliseconds
Total number of steps in this run
Run result data
Error details (e.g., {"message": "Run canceled"})
Navigation metadata for the run
Show child attributes
Show child attributes
⌘I