Read a turn
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/turns/{turn_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/turns/{turn_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/turns/{turn_id}', 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://{space}.{region}.api.niadra.com/v1/turns/{turn_id}",
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://{space}.{region}.api.niadra.com/v1/turns/{turn_id}"
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://{space}.{region}.api.niadra.com/v1/turns/{turn_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/turns/{turn_id}")
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{
"record": {
"agent": {
"name": "<string>",
"parent_turn_id": "<string>",
"role": "<string>"
},
"content_mode": "stored",
"started_at": "2023-11-07T05:31:56Z",
"turn_id": "<string>",
"blobs": {},
"build": {
"adapter": "<string>",
"pins": {
"assembler": "<string>",
"corpus_digest": "<string>",
"model": "<string>",
"niadra": {
"compiler": "<string>",
"pack_hash": "<string>"
},
"prompts": {},
"tool_schemas": {}
},
"sdk": "<string>"
},
"calls": [
{
"call_id": "<string>",
"kind": "tool",
"applied": {
"constraints": "<string>",
"results_checked": 1,
"unverifiable": 1,
"violations": 1,
"hard_sent": [
"<string>"
],
"relaxed": "declared"
},
"args": "<string>",
"args_hash": "<string>",
"attempt": 1,
"cache_hit": false,
"cost_units": {},
"effect_key": "<string>",
"latency_ms": 1,
"name": "<string>",
"observations": [
{
"fields": {},
"ref": "<string>",
"provenance": {
"source": "live",
"source_observed_at": "2023-11-07T05:31:56Z",
"scope": "global"
}
}
],
"parent_call_id": "<string>",
"result_model": "<string>",
"result_ui": "<string>",
"status": "ok",
"synthetic": false,
"tokens": {
"in": 1,
"out": 1,
"cached": 0
},
"truncated": false
}
],
"claims": [
{
"action": "none",
"category": "<string>",
"span": [
123,
123
],
"verdict": "matched",
"class": "money",
"evidence": {
"anchor": "<string>",
"call_id": "<string>",
"document": "<string>",
"field": "<string>",
"ref": "<string>",
"score": 0.5
},
"nature": "computed",
"role": "<string>",
"value": {
"amount": "<string>",
"date": "<string>",
"date_from": "<string>",
"date_to": "<string>",
"max": "<string>",
"min": "<string>",
"unit": "<string>"
}
}
],
"completeness": "complete",
"conversation_id": "<string>",
"coordination": [
{
"decision": "allow",
"decision_id": "<string>"
}
],
"cost": {
"usd": 1
},
"effects": [
{
"key": "<string>",
"state": "reserved"
}
],
"ended_at": "2023-11-07T05:31:56Z",
"fidelity": "gold",
"flags": [
"error"
],
"interactions": [
{
"delivered_at": "2023-11-07T05:31:56Z",
"exposure_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"pos": 5000,
"ref": "<string>",
"shown": {},
"team": "a"
}
],
"kind": "presented",
"list_id": "<string>",
"for": "self",
"list_kind": "results",
"method": "bridge",
"offset": 0,
"page": 1,
"parent_list_id": "<string>",
"visible_k": 50
}
],
"kind": "message",
"latency_ms": 1,
"output": {
"document": "<string>",
"event_keys": [
"<string>"
],
"handoff_id": "<string>",
"ui": "<string>"
},
"reads": [
{
"surface": "pack",
"blob": "<string>",
"etag": "<string>",
"receipt_id": "<string>",
"version": "<string>"
}
],
"spec": "turn-record.v0",
"task_id": "<string>"
},
"replayable": true,
"tier": "short",
"kept_until": "2023-11-07T05:31:56Z",
"replay_blockers": [
{
"reason": "content_mode",
"value": "<string>"
}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Turn records and replay
Read a turn
One turn from either tier, by id, as the viewer shows it: what it read, called, claimed and said, and why it cannot be replayed, when it cannot.
GET
/
v1
/
turns
/
{turn_id}
Read a turn
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/turns/{turn_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/turns/{turn_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/turns/{turn_id}', 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://{space}.{region}.api.niadra.com/v1/turns/{turn_id}",
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://{space}.{region}.api.niadra.com/v1/turns/{turn_id}"
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://{space}.{region}.api.niadra.com/v1/turns/{turn_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/turns/{turn_id}")
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{
"record": {
"agent": {
"name": "<string>",
"parent_turn_id": "<string>",
"role": "<string>"
},
"content_mode": "stored",
"started_at": "2023-11-07T05:31:56Z",
"turn_id": "<string>",
"blobs": {},
"build": {
"adapter": "<string>",
"pins": {
"assembler": "<string>",
"corpus_digest": "<string>",
"model": "<string>",
"niadra": {
"compiler": "<string>",
"pack_hash": "<string>"
},
"prompts": {},
"tool_schemas": {}
},
"sdk": "<string>"
},
"calls": [
{
"call_id": "<string>",
"kind": "tool",
"applied": {
"constraints": "<string>",
"results_checked": 1,
"unverifiable": 1,
"violations": 1,
"hard_sent": [
"<string>"
],
"relaxed": "declared"
},
"args": "<string>",
"args_hash": "<string>",
"attempt": 1,
"cache_hit": false,
"cost_units": {},
"effect_key": "<string>",
"latency_ms": 1,
"name": "<string>",
"observations": [
{
"fields": {},
"ref": "<string>",
"provenance": {
"source": "live",
"source_observed_at": "2023-11-07T05:31:56Z",
"scope": "global"
}
}
],
"parent_call_id": "<string>",
"result_model": "<string>",
"result_ui": "<string>",
"status": "ok",
"synthetic": false,
"tokens": {
"in": 1,
"out": 1,
"cached": 0
},
"truncated": false
}
],
"claims": [
{
"action": "none",
"category": "<string>",
"span": [
123,
123
],
"verdict": "matched",
"class": "money",
"evidence": {
"anchor": "<string>",
"call_id": "<string>",
"document": "<string>",
"field": "<string>",
"ref": "<string>",
"score": 0.5
},
"nature": "computed",
"role": "<string>",
"value": {
"amount": "<string>",
"date": "<string>",
"date_from": "<string>",
"date_to": "<string>",
"max": "<string>",
"min": "<string>",
"unit": "<string>"
}
}
],
"completeness": "complete",
"conversation_id": "<string>",
"coordination": [
{
"decision": "allow",
"decision_id": "<string>"
}
],
"cost": {
"usd": 1
},
"effects": [
{
"key": "<string>",
"state": "reserved"
}
],
"ended_at": "2023-11-07T05:31:56Z",
"fidelity": "gold",
"flags": [
"error"
],
"interactions": [
{
"delivered_at": "2023-11-07T05:31:56Z",
"exposure_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"pos": 5000,
"ref": "<string>",
"shown": {},
"team": "a"
}
],
"kind": "presented",
"list_id": "<string>",
"for": "self",
"list_kind": "results",
"method": "bridge",
"offset": 0,
"page": 1,
"parent_list_id": "<string>",
"visible_k": 50
}
],
"kind": "message",
"latency_ms": 1,
"output": {
"document": "<string>",
"event_keys": [
"<string>"
],
"handoff_id": "<string>",
"ui": "<string>"
},
"reads": [
{
"surface": "pack",
"blob": "<string>",
"etag": "<string>",
"receipt_id": "<string>",
"version": "<string>"
}
],
"spec": "turn-record.v0",
"task_id": "<string>"
},
"replayable": true,
"tier": "short",
"kept_until": "2023-11-07T05:31:56Z",
"replay_blockers": [
{
"reason": "content_mode",
"value": "<string>"
}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Authorizations
sourceKeypersonToken
nia_sk_...
Path Parameters
Pattern:
^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$Response
Successful Response
A recorded turn as the viewer shows it. In pointer and hash_only modes, blobs have no content.
One turn, from its input (a message, an interface action, an event, a timer firing) to the last thing it emitted to the customer or to a document.
Show child attributes
Show child attributes
Every pin the recording requires is there.
Available options:
short, kept Why the turn cannot be run again; empty when it can.
Show child attributes
Show child attributes

