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
},
"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>"
},
"items": [
{
"oId": "<string>",
"index": 123,
"label": "<string>",
"status": "queued",
"item": "<string>",
"output": {
"kind": "skill",
"skillRunOId": "<string>",
"title": "<string>",
"assetUrl": "<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. 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
},
"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>"
},
"items": [
{
"oId": "<string>",
"index": 123,
"label": "<string>",
"status": "queued",
"item": "<string>",
"output": {
"kind": "skill",
"skillRunOId": "<string>",
"title": "<string>",
"assetUrl": "<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>"
}Authorizations
Path Parameters
The run's oId (run_ prefix), from the start call.
Required string length:
1 - 64Example:
"run_3rgkoHhR00cEdE9DjKeIK"
Query Parameters
Items to skip, in item order.
Required range:
x >= 0Items to return (0–100).
Required range:
0 <= x <= 100Response
The run and a page of its items
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A page of the run's items in order: each item's values, status, output (a skill item's Asset link), credits and error.
Show child attributes
Show child attributes
Every item of the run, of which items is one page.
Whether more items follow this page.