Skip to main content
POST
/
v3
/
spans
/
fields
Get span field coverage
curl --request POST \
  --url https://api.example.com/v3/spans/fields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "application_id": "c688de46-2054-49ab-b85f-0f0178cb44d7",
  "start_time": "2026-05-01T00:00:00Z",
  "end_time": "2026-05-18T23:59:59Z",
  "filter": {
    "condition": "AND",
    "rules": [
      {
        "field": "Span::span_type",
        "operator": "eq",
        "value": "llm"
      }
    ]
  }
}
'
{
  "data": {
    "total_spans": 10000,
    "sampled": true,
    "span_attributes": [
      {
        "key": "system.gen_ai.usage.input_tokens",
        "count": 10000
      },
      {
        "key": "system.gen_ai.usage.output_tokens",
        "count": 10000
      },
      {
        "key": "system.gen_ai.context.retrieval",
        "count": 5
      }
    ],
    "evaluator_outputs": [
      {
        "rule_name": "Safety",
        "output_name": "is_toxic",
        "count": 10000
      },
      {
        "rule_name": "Faithfulness",
        "output_name": "score",
        "count": 3200
      }
    ]
  },
  "api_version": "3.0",
  "kind": "NORMAL"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
application_id
string<uuid>
required

UUID of the GenAI application to query spans from

start_time
string<date-time>
required

Start of the time range (inclusive, UTC).

end_time
string<date-time>
required

End of the time range (exclusive, UTC).

filter
object

Optional structured filter tree. Uses the same DSL as POST /spans/query. Maximum nesting depth is 3 levels and maximum total rule count is 10.

Response

Span field coverage for the matching spans

Response object for standard API responses.

api_version
enum<string>
default:3.0

API version.

Available options:
2.0,
3.0
kind
enum<string>
default:NORMAL

Type of response, indicating a normal response.

Available options:
NORMAL
data
object