# Requires the executions:manage key scope.
# Idempotency-Key is optional: send one to make a retry safe.
curl -X POST "https://api.triggr-app.com/api/v1/executions/<executionId>/cancel" \
-H "Authorization: Bearer $TRIGGR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"// Requires the executions:manage key scope.
// Idempotency-Key is optional: send one to make a retry safe.
const res = await fetch("https://api.triggr-app.com/api/v1/executions/<executionId>/cancel", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIGGR_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
if (!res.ok) throw new Error(`Triggr ${res.status}: ${await res.text()}`);
const data = await res.json();# Requires the executions:manage key scope.
# Idempotency-Key is optional: send one to make a retry safe.
$headers = @{
Authorization = "Bearer $env:TRIGGR_API_KEY"
'Idempotency-Key' = [guid]::NewGuid().ToString()
}
Invoke-RestMethod -Method Post -Uri 'https://api.triggr-app.com/api/v1/executions/<executionId>/cancel' -Headers $headersimport requests
url = "https://api.triggr-app.com/api/v1/executions/{executionId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.triggr-app.com/api/v1/executions/{executionId}/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.triggr-app.com/api/v1/executions/{executionId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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.triggr-app.com/api/v1/executions/{executionId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.triggr-app.com/api/v1/executions/{executionId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.triggr-app.com/api/v1/executions/{executionId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"executionId": "1b4e28ba-2fa1-11d2-883f-0016d3cca427",
"message": "Execution cancelled"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Cancel a running execution
Stops a pending, running or paused run; its open approvals and manual steps are closed (announced as approval.expired / manual_step.cancelled). Requires the executions:manage key scope.
# Requires the executions:manage key scope.
# Idempotency-Key is optional: send one to make a retry safe.
curl -X POST "https://api.triggr-app.com/api/v1/executions/<executionId>/cancel" \
-H "Authorization: Bearer $TRIGGR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"// Requires the executions:manage key scope.
// Idempotency-Key is optional: send one to make a retry safe.
const res = await fetch("https://api.triggr-app.com/api/v1/executions/<executionId>/cancel", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIGGR_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
if (!res.ok) throw new Error(`Triggr ${res.status}: ${await res.text()}`);
const data = await res.json();# Requires the executions:manage key scope.
# Idempotency-Key is optional: send one to make a retry safe.
$headers = @{
Authorization = "Bearer $env:TRIGGR_API_KEY"
'Idempotency-Key' = [guid]::NewGuid().ToString()
}
Invoke-RestMethod -Method Post -Uri 'https://api.triggr-app.com/api/v1/executions/<executionId>/cancel' -Headers $headersimport requests
url = "https://api.triggr-app.com/api/v1/executions/{executionId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.triggr-app.com/api/v1/executions/{executionId}/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.triggr-app.com/api/v1/executions/{executionId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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.triggr-app.com/api/v1/executions/{executionId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.triggr-app.com/api/v1/executions/{executionId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.triggr-app.com/api/v1/executions/{executionId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"executionId": "1b4e28ba-2fa1-11d2-883f-0016d3cca427",
"message": "Execution cancelled"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Organisation API key. Scoped operations carry x-triggr-scope; the scopes themselves are described in x-triggr-scopes.
Headers
OPTIONAL — omit it and this operation behaves exactly as it always has. A unique value (a UUID) you choose per request. A retry with the same key and the same method, path and body within 24 hours gets the first response replayed (status and body, with Idempotent-Replayed: true) instead of running again; the same key with a different request is refused with 422. A 5xx is not stored, so that retry runs. A one-time credential is never stored: on a replay any secret is null, with an idempotentReplayNote explaining it.
1 - 255
