---
title: "POST /TraceGraph"
method: POST
path: "/TraceGraph"
---

# POST /TraceGraph

`POST /TraceGraph`

Retrieves a service graph for one or more specific trace IDs.

## Query parameters

- `NextToken` string

## Request body

- object
  - `TraceIds` TraceId[], required — Trace IDs of requests for which to generate a service graph.
  - `NextToken` string — Pagination token.

## Response `200`

Success

- GetTraceGraphResult
  - `Services` Service[] — The services that have processed one of the specified requests.
    - `ReferenceId` integer — Identifier for the service. Unique within the service map.
    - `Name` string — The canonical name of the service.
    - `Names` String[] — A list of names for the service, including the canonical name.
    - `Root` boolean — Indicates that the service was the first service to process a request.
    - `AccountId` string — Identifier of the Amazon Web Services account in which the service runs.
    - `Type` string — <p>The type of service.</p> <ul> <li> <p>Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, <code>AWS::EC2::Instance</code> for an application running on Amazon EC2 or <code>AWS::DynamoDB::Table</code> for an Amazon DynamoDB table that the application used.</p> </li> <li> <p>Amazon Web Services Service - The type of an Amazon Web Services service. For example, <code>AWS::DynamoDB</code> for downstream calls to Amazon DynamoDB that didn't target a specific table.</p> </li> <li> <p> <code>client</code> - Represents the clients that sent requests to a root service.</p> </li> <li> <p> <code>remote</code> - A downstream service of indeterminate type.</p> </li> </ul>
    - `State` string — The service's state.
    - `StartTime` string, date-time — The start time of the first segment that the service generated.
    - `EndTime` string, date-time — The end time of the last segment that the service generated.
    - `Edges` Edge[] — Connections to downstream services.
      - `ReferenceId` integer — Identifier of the edge. Unique within a service map.
      - `StartTime` string, date-time — The start time of the first segment on the edge.
      - `EndTime` string, date-time — The end time of the last segment on the edge.
      - `SummaryStatistics` object — Response statistics for segments on the edge.
        - `OkCount` integer — The number of requests that completed with a 2xx Success status code.
        - `ErrorStatistics` object — Information about requests that failed with a 4xx Client Error status code.
          - `ThrottleCount` integer — The number of requests that failed with a 419 throttling status code.
          - `OtherCount` integer — The number of requests that failed with untracked 4xx Client Error status codes.
          - `TotalCount` integer — The total number of requests that failed with a 4xx Client Error status code.
        - `FaultStatistics` object — Information about requests that failed with a 5xx Server Error status code.
          - `OtherCount` integer — The number of requests that failed with untracked 5xx Server Error status codes.
          - `TotalCount` integer — The total number of requests that failed with a 5xx Server Error status code.
        - `TotalCount` integer — The total number of completed requests.
        - `TotalResponseTime` number, double — The aggregate response time of completed requests.
      - `ResponseTimeHistogram` HistogramEntry[] — A histogram that maps the spread of client response times on an edge. Only populated for synchronous edges.
        - `Value` number, double — The value of the entry.
        - `Count` integer — The prevalence of the entry.
      - `Aliases` Alias[] — Aliases for the edge.
        - `Name` string — The canonical name of the alias.
        - `Names` String[] — A list of names for the alias, including the canonical name.
        - `Type` string — The type of the alias.
      - `EdgeType` string — Describes an asynchronous connection, with a value of <code>link</code>.
      - `ReceivedEventAgeHistogram` HistogramEntry[] — 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 <i>EdgeType</i> is <code>link</code>.
        - `Value` number, double — The value of the entry.
        - `Count` integer — The prevalence of the entry.
    - `SummaryStatistics` object — Aggregated statistics for the service.
      - `OkCount` integer — The number of requests that completed with a 2xx Success status code.
      - `ErrorStatistics` object — Information about requests that failed with a 4xx Client Error status code.
        - `ThrottleCount` integer — The number of requests that failed with a 419 throttling status code.
        - `OtherCount` integer — The number of requests that failed with untracked 4xx Client Error status codes.
        - `TotalCount` integer — The total number of requests that failed with a 4xx Client Error status code.
      - `FaultStatistics` object — Information about requests that failed with a 5xx Server Error status code.
        - `OtherCount` integer — The number of requests that failed with untracked 5xx Server Error status codes.
        - `TotalCount` integer — The total number of requests that failed with a 5xx Server Error status code.
      - `TotalCount` integer — The total number of completed requests.
      - `TotalResponseTime` number, double — The aggregate response time of completed requests.
    - `DurationHistogram` HistogramEntry[] — A histogram that maps the spread of service durations.
      - `Value` number, double — The value of the entry.
      - `Count` integer — The prevalence of the entry.
    - `ResponseTimeHistogram` HistogramEntry[] — A histogram that maps the spread of service response times.
      - `Value` number, double — The value of the entry.
      - `Count` integer — The prevalence of the entry.
  - `NextToken` string — Pagination token.

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottledException

---

[API](https://skmtc.net/aws/apis/xray.md) · [All operations](https://skmtc.net/aws/apis/xray/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/xray/versions/4970909a360e/schema)
