---
title: "GET /tracer/observation-span/root-spans/"
method: GET
path: "/tracer/observation-span/root-spans/"
tags: ["tracer"]
---

# GET /tracer/observation-span/root-spans/

`GET /tracer/observation-span/root-spans/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/tracer/observation-span/root-spans/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Given a list of trace_ids, return the root span ID for each trace.
Root span = the span where parent_span_id IS NULL for that trace.

Query params (repeated): trace_ids (required,
?trace_ids=<id>&trace_ids=<id>) + optional project_ids (prunes the CH
scan). Response: { "result": { "<trace_id>": "<span_id>", ... } }

## Query parameters

- `page` integer
- `limit` integer
- `trace_ids` string[], required
- `project_ids` string[]

## Response `200`

OK

- RootSpansResponse
  - `status` boolean
  - `result` object, required

## Other responses

- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
