List all runs
curl --request GET \
--url https://api.komos.ai/public/v1/task-runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.komos.ai/public/v1/task-runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.komos.ai/public/v1/task-runs', 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.komos.ai/public/v1/task-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.komos.ai/public/v1/task-runs"
req, _ := http.NewRequest("GET", 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.get("https://api.komos.ai/public/v1/task-runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komos.ai/public/v1/task-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"runs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"timestamps": {
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z"
},
"inputs": {},
"outputs": {},
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerType": "manual",
"progress": {
"currentStep": 123,
"stepsTotal": 123
},
"logsUrl": "<string>",
"error": {
"message": "<string>"
},
"cancelReason": "<string>"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}Task runs
List All Runs
Retrieve a paginated list of runs across all tasks.
GET
/
public
/
v1
/
task-runs
List all runs
curl --request GET \
--url https://api.komos.ai/public/v1/task-runs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.komos.ai/public/v1/task-runs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.komos.ai/public/v1/task-runs', 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.komos.ai/public/v1/task-runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.komos.ai/public/v1/task-runs"
req, _ := http.NewRequest("GET", 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.get("https://api.komos.ai/public/v1/task-runs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komos.ai/public/v1/task-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"runs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"timestamps": {
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z"
},
"inputs": {},
"outputs": {},
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggerType": "manual",
"progress": {
"currentStep": 123,
"stepsTotal": 123
},
"logsUrl": "<string>",
"error": {
"message": "<string>"
},
"cancelReason": "<string>"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"detail": "<string>"
}{
"detail": "<string>"
}Returns a paginated list of task runs across your entire organization, ordered from newest to
oldest. Use this for cross-task dashboards, monitoring, and audit trails.
To list runs for a specific task, you can either use this endpoint with the
taskId filter or
use the task-scoped List Task Runs endpoint.
Request
Query parameters
limit(integer, optional) — Number of runs to return per page. Min 1, max 100, default 20.offset(integer, optional) — Number of runs to skip for pagination. Default 0.status(string, optional) — Filter by run status:PENDING,RUNNING,COMPLETED,FAILED,CANCELLED.taskId(UUID, optional) — Filter runs to a specific task.since(string, optional) — ISO 8601 timestamp. Only return runs created after this time. Defaults to 7 days ago.until(string, optional) — ISO 8601 timestamp. Only return runs created before this time.
Example
curl -X GET \
'https://api.komos.ai/public/v1/task-runs?limit=10&status=FAILED' \
-H 'Authorization: Bearer sk_live_example'
Responses
200 OK— Returns{ "runs": Run[], "total": int, "limit": int, "offset": int }.400 Bad Request— Invalid task ID or status filter.401 Unauthorized— Missing or malformed API key.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Number of runs per page (1-100, default 20).
Required range:
1 <= x <= 100Number of runs to skip.
Required range:
x >= 0Filter by run status.
Available options:
PENDING, RUNNING, COMPLETED, FAILED, CANCELLED Filter runs to a specific task.
ISO 8601 timestamp. Only return runs created after this time. Defaults to 7 days ago.
ISO 8601 timestamp. Only return runs created before this time.
Was this page helpful?