Query Spans
curl --request POST \
--url https://flow.seekr.com/v1/observability/spans \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
'import requests
url = "https://flow.seekr.com/v1/observability/spans"
payload = {
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
min_start_datetime: '2023-11-07T05:31:56Z',
max_start_datetime: '2023-11-07T05:31:56Z',
agent_id: '<string>',
run_id: '<string>',
trace_id: '<string>',
thread_id: '<string>',
group: '<string>',
metadata: {},
limit: 100,
order: 'desc',
offset: 0
})
};
fetch('https://flow.seekr.com/v1/observability/spans', 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://flow.seekr.com/v1/observability/spans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'min_start_datetime' => '2023-11-07T05:31:56Z',
'max_start_datetime' => '2023-11-07T05:31:56Z',
'agent_id' => '<string>',
'run_id' => '<string>',
'trace_id' => '<string>',
'thread_id' => '<string>',
'group' => '<string>',
'metadata' => [
],
'limit' => 100,
'order' => 'desc',
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/observability/spans"
payload := strings.NewReader("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/observability/spans")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/observability/spans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body[
{
"run_id": "<string>",
"thread_id": "<string>",
"agent_id": "<string>",
"trace_id": "<string>",
"span_id": "<string>",
"span_name": "<string>",
"level": 123,
"service_name": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"end_timestamp": "2023-11-07T05:31:56Z",
"kind": "span",
"message": "<string>",
"group": "<string>",
"parent_span_id": "<string>",
"otel_scope_name": "<string>",
"is_exception": true,
"exception_type": "<string>",
"gen_ai_operation_name": "<string>",
"gen_ai_request_model": "<string>",
"gen_ai_response_model": "<string>",
"gen_ai_system": "<string>",
"gen_ai_usage_input_tokens": "<string>",
"gen_ai_usage_output_token": "<string>",
"seekr_metadata": {}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Query spans
Query observability spans filtered by user and other criteria.
POST
/
v1
/
observability
/
spans
Query Spans
curl --request POST \
--url https://flow.seekr.com/v1/observability/spans \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
'import requests
url = "https://flow.seekr.com/v1/observability/spans"
payload = {
"min_start_datetime": "2023-11-07T05:31:56Z",
"max_start_datetime": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"run_id": "<string>",
"trace_id": "<string>",
"thread_id": "<string>",
"group": "<string>",
"metadata": {},
"limit": 100,
"order": "desc",
"offset": 0
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
min_start_datetime: '2023-11-07T05:31:56Z',
max_start_datetime: '2023-11-07T05:31:56Z',
agent_id: '<string>',
run_id: '<string>',
trace_id: '<string>',
thread_id: '<string>',
group: '<string>',
metadata: {},
limit: 100,
order: 'desc',
offset: 0
})
};
fetch('https://flow.seekr.com/v1/observability/spans', 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://flow.seekr.com/v1/observability/spans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'min_start_datetime' => '2023-11-07T05:31:56Z',
'max_start_datetime' => '2023-11-07T05:31:56Z',
'agent_id' => '<string>',
'run_id' => '<string>',
'trace_id' => '<string>',
'thread_id' => '<string>',
'group' => '<string>',
'metadata' => [
],
'limit' => 100,
'order' => 'desc',
'offset' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://flow.seekr.com/v1/observability/spans"
payload := strings.NewReader("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://flow.seekr.com/v1/observability/spans")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flow.seekr.com/v1/observability/spans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"min_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"max_start_datetime\": \"2023-11-07T05:31:56Z\",\n \"agent_id\": \"<string>\",\n \"run_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"thread_id\": \"<string>\",\n \"group\": \"<string>\",\n \"metadata\": {},\n \"limit\": 100,\n \"order\": \"desc\",\n \"offset\": 0\n}"
response = http.request(request)
puts response.read_body[
{
"run_id": "<string>",
"thread_id": "<string>",
"agent_id": "<string>",
"trace_id": "<string>",
"span_id": "<string>",
"span_name": "<string>",
"level": 123,
"service_name": "<string>",
"start_timestamp": "2023-11-07T05:31:56Z",
"end_timestamp": "2023-11-07T05:31:56Z",
"kind": "span",
"message": "<string>",
"group": "<string>",
"parent_span_id": "<string>",
"otel_scope_name": "<string>",
"is_exception": true,
"exception_type": "<string>",
"gen_ai_operation_name": "<string>",
"gen_ai_request_model": "<string>",
"gen_ai_response_model": "<string>",
"gen_ai_system": "<string>",
"gen_ai_usage_input_tokens": "<string>",
"gen_ai_usage_output_token": "<string>",
"seekr_metadata": {}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Returns a list of span summaries matching the provided filters. All filters are optional. If
min_start_datetime is not provided, the query defaults to the last 15 minutes. Start with run_id when investigating a specific agent run. Use limit and offset to paginate results and order to sort by start time.
To retrieve the full record for a specific span, use the retrieve span endpoint.Authorizations
Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
Headers
Body
application/json
Object to contain request data for retrieving spans in bulk.
Required string length:
1 - 32768Show child attributes
Show child attributes
Required range:
x >= 0Options for order query param in list endpoints.
Available options:
asc, desc Required range:
x >= 0Response
Success
Indicates the type of record for a logfire record.
Available options:
span, pending_span, log, span_event Show child attributes
Show child attributes
Last modified on July 31, 2026
Was this page helpful?
⌘I