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

# POST /ServiceGraph

`POST /ServiceGraph`

Retrieves a document that describes services that process incoming requests, and downstream services that they call as a result. Root services process incoming requests and make calls to downstream services. Root services are applications that use the <a href="https://docs.aws.amazon.com/xray/index.html">Amazon Web Services X-Ray SDK</a>. Downstream services can be other applications, Amazon Web Services resources, HTTP web APIs, or SQL databases.

## Query parameters

- `NextToken` string

## Request body

- object
  - `StartTime` string, date-time, required — The start of the time frame for which to generate a graph.
  - `EndTime` string, date-time, required — The end of the timeframe for which to generate a graph.
  - `GroupName` string — The name of a group based on which you want to generate a graph.
  - `GroupARN` string — The Amazon Resource Name (ARN) of a group based on which you want to generate a graph.
  - `NextToken` string — Pagination token.

## Response `200`

Success

- GetServiceGraphResult
  - `StartTime` string, date-time — The start of the time frame for which the graph was generated.
  - `EndTime` string, date-time — The end of the time frame for which the graph was generated.
  - `Services` Service[] — The services that have processed a traced request during the specified time frame.
    - `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.
  - `ContainsOldGroupVersions` boolean — A flag indicating whether the group's filter expression has been consistent, or if the returned service graph may show traces from an older version of the group's filter expression.
  - `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)
