List turns
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns', 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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns",
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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns"
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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns")
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{
"data": [
{
"id": "<string>",
"agent_id": "<string>",
"turn_sequence": 4503599627370496,
"event_count": 4503599627370496,
"opening_events": [
{
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"agent_id": "<string>",
"turn_id": "<string>",
"turn_sequence": 4503599627370496,
"is_opening_event": true,
"sequence": 4503599627370496,
"event_kind": "agent_input",
"agent_input_id": "<string>",
"input_kind": "content",
"content_blocks": [
{
"type": "text",
"text": "<string>",
"metadata": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"actor_id": "<string>",
"input_idempotency_key": "<string>",
"control_type": "cancel_current",
"interaction_id": "<string>",
"agent_config_id": "<string>"
}
],
"started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"latest_event": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"agent_id": "<string>",
"turn_id": "<string>",
"turn_sequence": 4503599627370496,
"is_opening_event": true,
"sequence": 4503599627370496,
"event_kind": "agent_input",
"agent_input_id": "<string>",
"input_kind": "content",
"content_blocks": [
{
"type": "text",
"text": "<string>",
"metadata": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"actor_id": "<string>",
"input_idempotency_key": "<string>",
"control_type": "cancel_current",
"interaction_id": "<string>",
"agent_config_id": "<string>"
},
"latest_semantic_event": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"agent_id": "<string>",
"turn_id": "<string>",
"turn_sequence": 4503599627370496,
"is_opening_event": true,
"sequence": 4503599627370496,
"event_kind": "agent_input",
"agent_input_id": "<string>",
"input_kind": "content",
"content_blocks": [
{
"type": "text",
"text": "<string>",
"metadata": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"actor_id": "<string>",
"input_idempotency_key": "<string>",
"control_type": "cancel_current",
"interaction_id": "<string>",
"agent_config_id": "<string>"
}
}
],
"next_before_turn_sequence": 4503599627370495
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Events
List turns
Returns turns newest first. Use the returned next_before_turn_sequence as before_turn_sequence to fetch older turns.
GET
/
orgs
/
{orgID}
/
projects
/
{projectID}
/
agents
/
{agentID}
/
turns
List turns
curl --request GET \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns', 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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns",
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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns"
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.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns")
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{
"data": [
{
"id": "<string>",
"agent_id": "<string>",
"turn_sequence": 4503599627370496,
"event_count": 4503599627370496,
"opening_events": [
{
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"agent_id": "<string>",
"turn_id": "<string>",
"turn_sequence": 4503599627370496,
"is_opening_event": true,
"sequence": 4503599627370496,
"event_kind": "agent_input",
"agent_input_id": "<string>",
"input_kind": "content",
"content_blocks": [
{
"type": "text",
"text": "<string>",
"metadata": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"actor_id": "<string>",
"input_idempotency_key": "<string>",
"control_type": "cancel_current",
"interaction_id": "<string>",
"agent_config_id": "<string>"
}
],
"started_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"latest_event": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"agent_id": "<string>",
"turn_id": "<string>",
"turn_sequence": 4503599627370496,
"is_opening_event": true,
"sequence": 4503599627370496,
"event_kind": "agent_input",
"agent_input_id": "<string>",
"input_kind": "content",
"content_blocks": [
{
"type": "text",
"text": "<string>",
"metadata": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"actor_id": "<string>",
"input_idempotency_key": "<string>",
"control_type": "cancel_current",
"interaction_id": "<string>",
"agent_config_id": "<string>"
},
"latest_semantic_event": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"agent_id": "<string>",
"turn_id": "<string>",
"turn_sequence": 4503599627370496,
"is_opening_event": true,
"sequence": 4503599627370496,
"event_kind": "agent_input",
"agent_input_id": "<string>",
"input_kind": "content",
"content_blocks": [
{
"type": "text",
"text": "<string>",
"metadata": {}
}
],
"created_at": "2023-11-07T05:31:56Z",
"actor_id": "<string>",
"input_idempotency_key": "<string>",
"control_type": "cancel_current",
"interaction_id": "<string>",
"agent_config_id": "<string>"
}
}
],
"next_before_turn_sequence": 4503599627370495
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Authorizations
bearerAuthbrowserSessionCookie
An opaque Omnara personal or organization bearer token.
Path Parameters
Pattern:
^org_[a-z2-7]{26}$Pattern:
^proj_[a-z2-7]{26}$Pattern:
^agt_[a-z2-7]{26}$Query Parameters
Exclusive turn sequence boundary. Omit or pass 0 for the newest turns.
Required range:
x >= 0Maximum number of turns to return.
Required range:
1 <= x <= 100⌘I