Skip to main content
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",
    "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

Authorization
string
header
required

Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.

Headers

x-team-id
string | null

Body

application/json

Object to contain request data for retrieving spans in bulk.

min_start_datetime
string<date-time> | null
max_start_datetime
string<date-time> | null
agent_id
string | null
run_id
string | null
trace_id
string | null
thread_id
string | null
group
string | null
metadata
Metadata · object | null
limit
integer
default:100
order
enum<string>
default:desc

Options for order query param in list endpoints.

Available options:
asc,
desc
offset
integer
default:0

Response

Successful Response

run_id
string
required
thread_id
string
required
agent_id
string
required
trace_id
string
required
span_id
string
required
span_name
string
required
level
integer
required
service_name
string
required
start_timestamp
string<date-time>
required
end_timestamp
string<date-time>
required
kind
enum<string>
required

Indicates the type of record for a logfire record.

Available options:
span,
pending_span,
log,
span_event
message
string
required
group
string | null
parent_span_id
string | null
otel_scope_name
string | null
is_exception
boolean | null
exception_type
string | null
gen_ai_operation_name
string | null
gen_ai_request_model
string | null
gen_ai_response_model
string | null
gen_ai_system
string | null
gen_ai_usage_input_tokens
string | null
gen_ai_usage_output_token
string | null
seekr_metadata
Seekr Metadata · object | null
Last modified on June 18, 2026