Cancel a flow run
curl --request POST \
--url https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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 := "https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_error": {
"label": "<string>",
"message": "<string>"
},
"callback": {
"url": "<string>"
},
"status": "CREATED",
"output_count": 0,
"scheduled_flow_run_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "<string>",
"finished_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error_label": "<string>",
"error_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}{
"error_label": "<string>",
"error_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}Flow Runs
Cancel Flow Run
Cancel a running or pending flow run
POST
/
flows
/
runs
/
{flow_run_uid}
/
cancel
Cancel a flow run
curl --request POST \
--url https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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 := "https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edges.run/v1/flows/runs/{flow_run_uid}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_error": {
"label": "<string>",
"message": "<string>"
},
"callback": {
"url": "<string>"
},
"status": "CREATED",
"output_count": 0,
"scheduled_flow_run_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"started_at": "<string>",
"finished_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error_label": "<string>",
"error_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}{
"error_label": "<string>",
"error_scope": "input",
"error_ref": "ERR-12345",
"message": "<string>",
"status_code": 123,
"params": {},
"data": {}
}Cancel a flow run that is currently running or pending. This immediately stops the flow and prevents any further processing.
Use Cases:
- Stop a flow that was started with incorrect parameters
- Cancel a long-running flow that is no longer needed
- Abort processing to avoid unnecessary credit consumption
CREATED- Flow is created but not yet startedQUEUED- Flow is waiting to be processedSCHEDULED- Flow is scheduled for future executionRUNNING- Flow is currently processing
Cancelling a flow run is irreversible. Any work already completed will be lost, and you will need to start a new flow run if you want to process the same inputs again.
Credits consumed before cancellation are not refunded. Cancel early to minimize credit usage.
Authorizations
Path Parameters
Flow run UUID
Response
Cancel the flow run
Cancel the flow run
Flow Run UUID
Member/User UUID
Workspace UUID
Last error message
Show child attributes
Show child attributes
Callback
Show child attributes
Show child attributes
Flow Run status
Available options:
CREATED, INVALID, QUEUED, SCHEDULED, BLOCKED, STOPPED, RUNNING, FAILED, PARTIAL_SUCCEEDED, SUCCEEDED Number of outputs generated by the flow run (only available when the flow run is finished)
If the flow run is scheduled, this field indicates the scheduled flow run UUID.
Started at
Finished at
Created at
Updated at

