Skip to main content
GET
/
orgs
/
{org_id}
/
projects
/
{project_id}
/
runs
cURL
curl --request GET \
  --url https://api.timbal.ai/orgs/{org_id}/projects/{project_id}/runs \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.timbal.ai/orgs/{org_id}/projects/{project_id}/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.timbal.ai/orgs/{org_id}/projects/{project_id}/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.timbal.ai/orgs/{org_id}/projects/{project_id}/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.timbal.ai/orgs/{org_id}/projects/{project_id}/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.timbal.ai/orgs/{org_id}/projects/{project_id}/runs")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.timbal.ai/orgs/{org_id}/projects/{project_id}/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": [
    {
      "cost_credits": 123,
      "cost_usd": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "idempotency_key": "<string>",
      "status": "<string>",
      "user": {
        "email": "<string>",
        "id": "<string>",
        "name": "<string>",
        "photo_url": "<string>"
      },
      "workforce": {
        "id": "<string>",
        "name": "<string>",
        "deleted_at": 123,
        "description": "<string>",
        "uid": "<string>",
        "url": "<string>"
      },
      "duration_ms": 123,
      "group_id": "<string>",
      "last_reaction_sentiment": "<string>",
      "parent_id": "<string>"
    }
  ],
  "next_page_token": "<string>"
}

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required
project_id
string
required

Query Parameters

user_id
string | null

Filter runs by user ID

status
string | null

Filter runs by status

sentiment
string | null

Filter runs by sentiment

group_id
string | null

Filter runs by group ID

workforce_id
string | null

Filter runs by workforce ID

rev
string | null

Filter runs by the git branch they were executed against (e.g. main). Runs without a recorded branch are always included for backwards compatibility with rows created before this field was tracked.

from
integer<int64> | null

Filter runs by start time (epoch timestamp in milliseconds)

to
integer<int64> | null

Filter runs by end time (epoch timestamp in milliseconds)

metadata
string | null

Filter runs by metadata

roots
boolean

When true, return only thread roots (runs that start a conversation, i.e. have no parent). For a root run, group_id equals its own id.

sort_by
null | any

Sort field (id, created_at, duration_ms, cost_usd, cost_credits)

sort_order
null | any

Sort direction (asc or desc; default desc)

page_token
string | null

Page token

Response

Runs listed successfully

runs
object[]
required

List of runs

next_page_token
string | null

Cursor for the next page