{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-xray/json-schema/amazon-xray-get-trace-graph-result-schema.json",
  "title": "GetTraceGraphResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-xray-tracegraph-api-openapi.yml#/components/schemas/GetTraceGraphResult",
  "type": "object",
  "properties": {
    "Services": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Service"
      },
      "description": "The services that have processed one of the specified requests."
    },
    "NextToken": {
      "type": "string",
      "description": "Pagination token."
    }
  },
  "$defs": {
    "Alias": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The canonical name of the alias."
        },
        "Names": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of names for the alias, including the canonical name."
        },
        "Type": {
          "type": "string",
          "description": "The type of the alias."
        }
      }
    },
    "Edge": {
      "type": "object",
      "properties": {
        "ReferenceId": {
          "type": "integer",
          "description": "Identifier of the edge. Unique within a service map."
        },
        "StartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The start time of the first segment on the edge."
        },
        "EndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end time of the last segment on the edge."
        },
        "SummaryStatistics": {
          "$ref": "#/$defs/EdgeStatistics"
        },
        "ResponseTimeHistogram": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HistogramEntry"
          },
          "description": "A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges."
        },
        "Aliases": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Alias"
          },
          "description": "Aliases for the edge."
        },
        "EdgeType": {
          "type": "string",
          "description": "Describes an asynchronous connection, with a value of link."
        },
        "ReceivedEventAgeHistogram": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HistogramEntry"
          },
          "description": "A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when EdgeType is link."
        }
      }
    },
    "EdgeStatistics": {
      "type": "object",
      "properties": {
        "OkCount": {
          "type": "integer",
          "description": "The number of requests that completed with a 2xx Success status code."
        },
        "ErrorStatistics": {
          "$ref": "#/$defs/ErrorStatistics"
        },
        "FaultStatistics": {
          "$ref": "#/$defs/FaultStatistics"
        },
        "TotalCount": {
          "type": "integer",
          "description": "The total number of completed requests."
        },
        "TotalResponseTime": {
          "type": "number",
          "description": "The aggregate response time of completed requests."
        }
      }
    },
    "ErrorStatistics": {
      "type": "object",
      "properties": {
        "ThrottleCount": {
          "type": "integer",
          "description": "The number of requests that failed with a 429 throttling status code."
        },
        "OtherCount": {
          "type": "integer",
          "description": "The number of requests that failed with untracked 4xx Client Error status codes."
        },
        "TotalCount": {
          "type": "integer",
          "description": "The total number of requests that failed with a 4xx Client Error status code."
        }
      }
    },
    "FaultStatistics": {
      "type": "object",
      "properties": {
        "OtherCount": {
          "type": "integer",
          "description": "The number of requests that failed with untracked 5xx Server Error status codes."
        },
        "TotalCount": {
          "type": "integer",
          "description": "The total number of requests that failed with a 5xx Server Error status code."
        }
      }
    },
    "HistogramEntry": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "number",
          "description": "The value of the entry."
        },
        "Count": {
          "type": "integer",
          "description": "The prevalence of the entry."
        }
      }
    },
    "Service": {
      "type": "object",
      "properties": {
        "ReferenceId": {
          "type": "integer",
          "description": "Identifier for the service. Unique within the service map."
        },
        "Name": {
          "type": "string",
          "description": "The canonical name of the service."
        },
        "Names": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of names for the service, including the canonical name."
        },
        "Root": {
          "type": "boolean",
          "description": "Indicates that the service was the first service to process a request."
        },
        "AccountId": {
          "type": "string",
          "description": "Identifier of the Amazon Web Services account in which the service runs."
        },
        "Type": {
          "type": "string",
          "description": "The type of service. Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used. Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table. client - Represents the clients that sent requests to a root service. remote - A downstream service of indeterminate type."
        },
        "State": {
          "type": "string",
          "description": "The service's state."
        },
        "StartTime": {
          "type": "string",
          "format": "date-time",
          "description": "The start time of the first segment that the service generated."
        },
        "EndTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end time of the last segment that the service generated."
        },
        "Edges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Edge"
          },
          "description": "Connections to downstream services."
        },
        "SummaryStatistics": {
          "$ref": "#/$defs/ServiceStatistics"
        },
        "DurationHistogram": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HistogramEntry"
          },
          "description": "A histogram that maps the spread of service durations."
        },
        "ResponseTimeHistogram": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HistogramEntry"
          },
          "description": "A histogram that maps the spread of service response times."
        }
      }
    },
    "ServiceStatistics": {
      "type": "object",
      "properties": {
        "OkCount": {
          "type": "integer",
          "description": "The number of requests that completed with a 2xx Success status code."
        },
        "ErrorStatistics": {
          "$ref": "#/$defs/ErrorStatistics"
        },
        "FaultStatistics": {
          "$ref": "#/$defs/FaultStatistics"
        },
        "TotalCount": {
          "type": "integer",
          "description": "The total number of completed requests."
        },
        "TotalResponseTime": {
          "type": "number",
          "description": "The aggregate response time of completed requests."
        }
      }
    }
  }
}