Bulk add spans to dataset
Accept a list of explicit span references and a field mapping, fetch span attributes from ClickHouse, apply the mapping server-side, and write one dataset item per span. All-or-nothing — if any span cannot be resolved, no items are written and a 422 is returned with the list of unresolvable spans.
start_time and end_time are required to bound the ClickHouse lookup to the relevant monthly partitions. Without them, the query would scan every partition for the application. The FE should pass the datagrid’s current time range; MCP agents should pass the time range of the spans being exported.
Mapping values are span attribute keys as returned by POST /v3/spans/fields (e.g. "system.gen_ai.usage.input_tokens", "user.cost_usd"). Each key maps to the corresponding value from the span’s span_attributes dict.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Dataset UUID
Body
UUID of the GenAI application to query spans from
Start of the time range (inclusive, UTC). Used to bound the ClickHouse partition scan to the relevant monthly partitions. Should match the time range of the spans being exported.
End of the time range (exclusive, UTC). Used to bound the ClickHouse partition scan to the relevant monthly partitions. Should match the time range of the spans being exported.
Explicit span references to resolve and write as dataset items. Maximum 200 per request.
1 - 200 elementsMaps dataset field keys to source span attribute paths. Each bucket contains { field_key: source_attr_path } pairs where source_attr_path is an OTel-convention key from the span's attributes.