Skip to main content
POST
/
api
/
svc
/
v1
/
spans
/
query
Get filtered spans data with detailed attributes
curl --request POST \
  --url https://{controlPlaneURL}/api/svc/v1/spans/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "startTime": "<string>",
  "endTime": "<string>",
  "traceIds": [
    "traceid1",
    "traceid2"
  ],
  "spanIds": [
    "spanId1",
    "spanId2"
  ],
  "parentSpanIds": [
    "",
    "parentSpanId1",
    "parentSpanId2"
  ],
  "createdBySubjectTypes": [
    "user",
    "virtualaccount"
  ],
  "createdBySubjectSlugs": [
    "[email protected]",
    "service-account"
  ],
  "applicationNames": [
    "tfy-llm-gateway",
    "order-service"
  ],
  "limit": 200,
  "sortDirection": "desc",
  "pageToken": "<string>",
  "tracingProjectFqn": "<string>",
  "filters": [
    {
      "spanFieldName": "spanName",
      "operator": "EQUAL",
      "value": "<string>"
    }
  ]
}'
{
  "data": [
    {
      "spanId": "<string>",
      "traceId": "<string>",
      "parentSpanId": "<string>",
      "serviceName": "<string>",
      "spanName": "<string>",
      "spanKind": "<string>",
      "scopeName": "<string>",
      "scopeVersion": "<string>",
      "timestamp": "<string>",
      "durationNs": 123,
      "statusCode": "<string>",
      "statusMessage": "<string>",
      "spanAttributes": {},
      "events": [
        {}
      ],
      "createdBySubject": {
        "subjectId": "<string>",
        "subjectType": "user",
        "subjectSlug": "<string>",
        "subjectDisplayName": "<string>"
      }
    }
  ],
  "pagination": {
    "limit": 10,
    "nextPageToken": "<string>",
    "previousPageToken": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Body

application/json
startTime
string
required
tracingProjectFqn
string
required
endTime
string
traceIds
string[]
Example:
spanIds
string[]
Example:
parentSpanIds
string[]
Example:
createdBySubjectTypes
enum<string>[]
Example:
createdBySubjectSlugs
string[]
Example:
applicationNames
string[]
Example:
limit
integer
Example:
sortDirection
enum<string>
Available options:
asc,
desc
Example:
pageToken
string
filters
(SpanFieldFilter · object | SpanAttributeFilter · object | GatewayRequestMetadataFilter · object)[]
  • SpanFieldFilter
  • SpanAttributeFilter
  • GatewayRequestMetadataFilter

Response

200 - application/json
data
TraceSpan · object[]
required
pagination
object
required