Get a run
curl --request GET \
--url https://app.octavehq.com/api/v2/runs/{oId} \
--header 'api_key: <api-key>'import requests
url = "https://app.octavehq.com/api/v2/runs/{oId}"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.octavehq.com/api/v2/runs/{oId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}"
req, _ := http.NewRequest("GET", 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.get("https://app.octavehq.com/api/v2/runs/{oId}")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/runs/{oId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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,
"asOf": "<string>",
"relayoutOf": "<string>",
"effort": "standard"
},
"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>"
}
},
"slackDm": {
"recipients": [
"jsmith@example.com"
]
},
"email": {
"recipients": [
"jsmith@example.com"
],
"subject": "<string>"
},
"webhook": {
"url": "<string>",
"signed": true
},
"callbackUrl": "<string>",
"source": "run"
},
"idempotencyKey": "<string>",
"createdBy": {
"oId": "<string>",
"email": "<string>"
},
"summary": {
"line": "<string>",
"deliveries": [
{
"destination": "<string>",
"ok": true,
"message": "<string>"
}
],
"stoppedReason": "<string>",
"prioritizedAbm": {
"activated": 123,
"outputAssetUrl": "<string>",
"slackStatus": "<string>",
"error": "<string>"
}
},
"error": "<string>",
"pauseReason": "user",
"cancelledAt": "<string>",
"cancelling": true,
"createdAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
},
"items": [
{
"oId": "<string>",
"index": 123,
"label": "<string>",
"status": "queued",
"item": "<string>",
"output": {
"kind": "skill",
"skillRunOId": "<string>",
"title": "<string>",
"assetUrl": "<string>",
"assetUuid": "<string>",
"structured": "<unknown>",
"nothingToReport": {
"message": "<string>"
}
},
"creditsCharged": 123,
"error": "<string>",
"pauseReason": "user",
"startedAt": "<string>",
"finishedAt": "<string>"
}
],
"itemsTotal": 123,
"hasNext": true
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Runs
Get a run
A run’s status (queued, running, succeeded, partial, failed, cancelled), counts, credits (unit price, quoted, held, charged) and a page of its items with their outputs. cancelling is true while a cancelled run winds down, before it ends cancelled. Poll every 10–30 seconds until the status is terminal.
GET
/
api
/
v2
/
runs
/
{oId}
Get a run
curl --request GET \
--url https://app.octavehq.com/api/v2/runs/{oId} \
--header 'api_key: <api-key>'import requests
url = "https://app.octavehq.com/api/v2/runs/{oId}"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.octavehq.com/api/v2/runs/{oId}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}"
req, _ := http.NewRequest("GET", 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.get("https://app.octavehq.com/api/v2/runs/{oId}")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/runs/{oId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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,
"asOf": "<string>",
"relayoutOf": "<string>",
"effort": "standard"
},
"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>"
}
},
"slackDm": {
"recipients": [
"jsmith@example.com"
]
},
"email": {
"recipients": [
"jsmith@example.com"
],
"subject": "<string>"
},
"webhook": {
"url": "<string>",
"signed": true
},
"callbackUrl": "<string>",
"source": "run"
},
"idempotencyKey": "<string>",
"createdBy": {
"oId": "<string>",
"email": "<string>"
},
"summary": {
"line": "<string>",
"deliveries": [
{
"destination": "<string>",
"ok": true,
"message": "<string>"
}
],
"stoppedReason": "<string>",
"prioritizedAbm": {
"activated": 123,
"outputAssetUrl": "<string>",
"slackStatus": "<string>",
"error": "<string>"
}
},
"error": "<string>",
"pauseReason": "user",
"cancelledAt": "<string>",
"cancelling": true,
"createdAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>"
},
"items": [
{
"oId": "<string>",
"index": 123,
"label": "<string>",
"status": "queued",
"item": "<string>",
"output": {
"kind": "skill",
"skillRunOId": "<string>",
"title": "<string>",
"assetUrl": "<string>",
"assetUuid": "<string>",
"structured": "<unknown>",
"nothingToReport": {
"message": "<string>"
}
},
"creditsCharged": 123,
"error": "<string>",
"pauseReason": "user",
"startedAt": "<string>",
"finishedAt": "<string>"
}
],
"itemsTotal": 123,
"hasNext": true
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Path Parameters
Query Parameters
Response
The run and a page of its items