---
search:
  tags:
    - Telemetry
    - GET
seo:
  description: >-
    Every span of one trace, parent links included, so a caller can rebuild the…
    Reference for the GET /v1/traces/{trace_id} endpoint in the sigiro API
    Reference.
sidebar:
  label: Fetch one whole trace
  badge: GET
title: Fetch one whole trace
type: openapi-operation
---
Every span of one trace, parent links included, so a caller can rebuild the tree. Trace IDs come from any SQL query over `sigiro_spans`.

`GET /v1/traces/{trace_id}`

**Responses**

- `200` — Trace detail

Response example, 200:

```json
{
  "critical_path": [
    "string"
  ],
  "error_count": 0,
  "root_span": {
    "duration_us": 0,
    "events_json": "string",
    "links_json": "string",
    "parent_span_id": "string",
    "resource_attributes": "string",
    "scope_name": "string",
    "scope_version": "string",
    "service_name": "string",
    "span_attributes": "string",
    "span_id": "string",
    "span_kind": 0,
    "span_name": "string",
    "status_code": 0,
    "timestamp": "string",
    "trace_id": "string",
    "trace_state": "string"
  },
  "service_breakdown": [
    {
      "duration_us": 0,
      "percentage": 0.1,
      "service": "string"
    }
  ],
  "services": [
    "string"
  ],
  "span_count": 0,
  "spans": [
    {
      "duration_us": 0,
      "events_json": "string",
      "links_json": "string",
      "parent_span_id": "string",
      "resource_attributes": "string",
      "scope_name": "string",
      "scope_version": "string",
      "service_name": "string",
      "span_attributes": "string",
      "span_id": "string",
      "span_kind": 0,
      "span_name": "string",
      "status_code": 0,
      "timestamp": "string",
      "trace_id": "string",
      "trace_state": "string"
    }
  ],
  "total_duration_us": 0,
  "trace_id": "string"
}
```
