observability
Get a session
Traces, token usage and a cost summary for one session.
GET
/
api
/
observability
/
session
/
{session_id}
Get a session
curl --request GET \
--url https://free.app.nasiko.com/api/observability/session/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://free.app.nasiko.com/api/observability/session/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://free.app.nasiko.com/api/observability/session/{session_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://free.app.nasiko.com/api/observability/session/{session_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://free.app.nasiko.com/api/observability/session/{session_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://free.app.nasiko.com/api/observability/session/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://free.app.nasiko.com/api/observability/session/{session_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{
"data": {
"session": {
"cache_creation_tokens": 1,
"cache_read_tokens": 1,
"cost_summary": {
"cache_creation": {
"cost": 123,
"tokens": 1
},
"cache_read": {
"cost": 123,
"tokens": 1
},
"completion": {
"cost": 123,
"tokens": 1
},
"prompt": {
"cost": 123,
"tokens": 1
},
"total": {
"cost": 123,
"tokens": 1
}
},
"id": "<string>",
"metrics_complete": true,
"num_traces": 1,
"pagination": {
"has_next_page": true,
"end_cursor": "<string>"
},
"session_id": "<string>",
"subagents": [
{
"session_id": "<string>",
"turns": 1,
"cost": 123,
"end_time": "<string>",
"spawn_tool_call_id": "<string>",
"start_time": "<string>",
"subagent_type": "<string>",
"title": "<string>",
"tokens": 1
}
],
"token_usage": {
"total": 1
},
"traces": [
{
"cursor": "<string>",
"id": "<string>",
"root_span": {
"attributes": "<string>",
"cache_creation_tokens": 1,
"cache_read_tokens": 1,
"cumulative_token_count_total": 1,
"id": "<string>",
"input": {
"mime_type": "<string>",
"value": "<string>",
"parsed_value": {}
},
"input_tokens": 1,
"latency_ms": 123,
"output": {
"mime_type": "<string>",
"value": "<string>",
"parsed_value": {}
},
"output_tokens": 1,
"project": {
"id": "<string>"
},
"span_annotation_summaries": [
{}
],
"span_annotations": [
{}
],
"span_id": "<string>",
"trace": {
"cost_summary": {},
"id": "<string>"
},
"start_time": "<string>"
},
"trace_id": "<string>"
}
],
"agent_name": "<string>",
"latency_avg": 123,
"latency_p50": 123,
"latency_p99": 123,
"parent_session_id": "<string>",
"spawn_tool_call_id": "<string>",
"subagent_type": "<string>",
"title": "<string>"
}
}
}Authorizations
⌘I
Get a session
curl --request GET \
--url https://free.app.nasiko.com/api/observability/session/{session_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://free.app.nasiko.com/api/observability/session/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://free.app.nasiko.com/api/observability/session/{session_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://free.app.nasiko.com/api/observability/session/{session_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://free.app.nasiko.com/api/observability/session/{session_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://free.app.nasiko.com/api/observability/session/{session_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://free.app.nasiko.com/api/observability/session/{session_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{
"data": {
"session": {
"cache_creation_tokens": 1,
"cache_read_tokens": 1,
"cost_summary": {
"cache_creation": {
"cost": 123,
"tokens": 1
},
"cache_read": {
"cost": 123,
"tokens": 1
},
"completion": {
"cost": 123,
"tokens": 1
},
"prompt": {
"cost": 123,
"tokens": 1
},
"total": {
"cost": 123,
"tokens": 1
}
},
"id": "<string>",
"metrics_complete": true,
"num_traces": 1,
"pagination": {
"has_next_page": true,
"end_cursor": "<string>"
},
"session_id": "<string>",
"subagents": [
{
"session_id": "<string>",
"turns": 1,
"cost": 123,
"end_time": "<string>",
"spawn_tool_call_id": "<string>",
"start_time": "<string>",
"subagent_type": "<string>",
"title": "<string>",
"tokens": 1
}
],
"token_usage": {
"total": 1
},
"traces": [
{
"cursor": "<string>",
"id": "<string>",
"root_span": {
"attributes": "<string>",
"cache_creation_tokens": 1,
"cache_read_tokens": 1,
"cumulative_token_count_total": 1,
"id": "<string>",
"input": {
"mime_type": "<string>",
"value": "<string>",
"parsed_value": {}
},
"input_tokens": 1,
"latency_ms": 123,
"output": {
"mime_type": "<string>",
"value": "<string>",
"parsed_value": {}
},
"output_tokens": 1,
"project": {
"id": "<string>"
},
"span_annotation_summaries": [
{}
],
"span_annotations": [
{}
],
"span_id": "<string>",
"trace": {
"cost_summary": {},
"id": "<string>"
},
"start_time": "<string>"
},
"trace_id": "<string>"
}
],
"agent_name": "<string>",
"latency_avg": 123,
"latency_p50": 123,
"latency_p99": 123,
"parent_session_id": "<string>",
"spawn_tool_call_id": "<string>",
"subagent_type": "<string>",
"title": "<string>"
}
}
}