Cancel a run
curl --request POST \
--url https://app.octavehq.com/api/v2/runs/{oId}/cancel \
--header 'api_key: <api-key>'import requests
url = "https://app.octavehq.com/api/v2/runs/{oId}/cancel"
headers = {"api_key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {api_key: '<api-key>'}};
fetch('https://app.octavehq.com/api/v2/runs/{oId}/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://app.octavehq.com/api/v2/runs/{oId}/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 => [
"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://app.octavehq.com/api/v2/runs/{oId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("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://app.octavehq.com/api/v2/runs/{oId}/cancel")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/runs/{oId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"run": {
"oId": "<string>",
"subject": {
"kind": "skill",
"skill": {
"source": "catalog",
"name": "<string>"
},
"draft": true
},
"subjectLabel": "<string>",
"request": "<string>",
"trigger": "manual",
"status": "queued",
"counts": {
"total": 123,
"pending": 123,
"succeeded": 123,
"failed": 123,
"skipped": 123
},
"credits": {
"unitPrice": 123,
"quoted": 123,
"held": 123,
"charged": 123
},
"delivery": {
"mode": "digest",
"slack": {
"channel": {
"id": "<string>",
"name": "<string>"
}
},
"webhook": {
"url": "<string>"
},
"callbackUrl": "<string>"
},
"idempotencyKey": "<string>",
"createdBy": {
"oId": "<string>",
"email": "<string>"
},
"summary": {
"line": "<string>",
"deliveries": [
{
"destination": "<string>",
"ok": true,
"message": "<string>"
}
],
"stoppedReason": "<string>"
},
"error": "<string>",
"pauseReason": "user",
"createdAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
}
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Runs
Cancel a run
Stops a run: items that have not started never start and cost nothing; items already working finish and are charged their own price. The run ends cancelled once the last of them settles. Cancelling a finished run changes nothing.
POST
/
api
/
v2
/
runs
/
{oId}
/
cancel
Cancel a run
curl --request POST \
--url https://app.octavehq.com/api/v2/runs/{oId}/cancel \
--header 'api_key: <api-key>'import requests
url = "https://app.octavehq.com/api/v2/runs/{oId}/cancel"
headers = {"api_key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {api_key: '<api-key>'}};
fetch('https://app.octavehq.com/api/v2/runs/{oId}/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://app.octavehq.com/api/v2/runs/{oId}/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 => [
"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://app.octavehq.com/api/v2/runs/{oId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("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://app.octavehq.com/api/v2/runs/{oId}/cancel")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/runs/{oId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"run": {
"oId": "<string>",
"subject": {
"kind": "skill",
"skill": {
"source": "catalog",
"name": "<string>"
},
"draft": true
},
"subjectLabel": "<string>",
"request": "<string>",
"trigger": "manual",
"status": "queued",
"counts": {
"total": 123,
"pending": 123,
"succeeded": 123,
"failed": 123,
"skipped": 123
},
"credits": {
"unitPrice": 123,
"quoted": 123,
"held": 123,
"charged": 123
},
"delivery": {
"mode": "digest",
"slack": {
"channel": {
"id": "<string>",
"name": "<string>"
}
},
"webhook": {
"url": "<string>"
},
"callbackUrl": "<string>"
},
"idempotencyKey": "<string>",
"createdBy": {
"oId": "<string>",
"email": "<string>"
},
"summary": {
"line": "<string>",
"deliveries": [
{
"destination": "<string>",
"ok": true,
"message": "<string>"
}
],
"stoppedReason": "<string>"
},
"error": "<string>",
"pauseReason": "user",
"createdAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
}
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}