{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-xray/json-schema/amazon-xray-list-retrieved-traces-result-schema.json",
  "title": "ListRetrievedTracesResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-xray-operations-api-openapi.yml#/components/schemas/ListRetrievedTracesResult",
  "type": "object",
  "properties": {
    "RetrievalStatus": {
      "type": "string",
      "enum": [
        "SCHEDULED",
        "RUNNING",
        "COMPLETE",
        "FAILED",
        "CANCELLED",
        "TIMEOUT"
      ],
      "description": "Status of the retrieval."
    },
    "TraceFormat": {
      "type": "string",
      "enum": [
        "XRAY",
        "OTEL"
      ],
      "description": "Format of the requested traces."
    },
    "Traces": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RetrievedTrace"
      },
      "description": "Full traces for the specified requests."
    },
    "NextToken": {
      "type": "string",
      "description": "Specify the pagination token returned by a previous request to retrieve the next page of indexes."
    }
  },
  "$defs": {
    "RetrievedTrace": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string",
          "description": "The unique identifier for the span."
        },
        "Duration": {
          "type": "number",
          "description": "The length of time in seconds between the start time of the root span and the end time of the last span that completed."
        },
        "Spans": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Span"
          },
          "description": "Spans that comprise the trace."
        }
      }
    },
    "Span": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string",
          "description": "The span ID."
        },
        "Document": {
          "type": "string",
          "description": "The span document."
        }
      }
    }
  }
}