Ingest agent-run trace spans
POST
/v1/agent-traces/{session_id}/spans
const url = 'https://api.aerandil.com/v1/agent-traces/example/spans';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"rows":[{}],"start_seq":0}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aerandil.com/v1/agent-traces/example/spans \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "rows": [ {} ], "start_seq": 0 }'Append a batch of enveloped trace rows exactly as the runtime emitted them (ts, session_id, gen_ai.agent.name, typed event payload). Idempotent per (session, seq) — re-posting a batch no-ops, so blind retries are safe. Requires traces:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”session_id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
rows
required
Enveloped trace rows, verbatim.
Array<object>
object
start_seq
Sequence number of rows[0]; the uploader keeps incremental batches contiguous.
integer
Responses
Section titled “Responses”Batch absorbed
Media typeapplication/json
object
inserted
integer
next_seq
integer
session_id
string
Examplegenerated
{ "inserted": 1, "next_seq": 1, "session_id": "example"}