GetRetrievedTracesGraph - AWS X-Ray

GetRetrievedTracesGraph

Retrieves a service graph for traces based on the specified RetrievalToken from the CloudWatch log group generated by Transaction Search. This API does not initiate a retrieval job. You must first execute StartTraceRetrieval to obtain the required RetrievalToken.

The trace graph describes services that process incoming requests and any downstream services they call, which may include AWS resources, external APIs, or databases.

The response is empty until the RetrievalStatus is COMPLETE. Retry the request after the status changes from RUNNING or SCHEDULED to COMPLETE to access the full service graph.

When CloudWatch log is the destination, this API can support cross-account observability and service graph retrieval across linked accounts.

For retrieving graphs from X-Ray directly as opposed to the Transaction-Search Log group, see GetTraceGraph.

Request Syntax

POST /GetRetrievedTracesGraph HTTP/1.1 Content-type: application/json { "NextToken": "string", "RetrievalToken": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

NextToken

Specify the pagination token returned by a previous request to retrieve the next page of indexes.

Type: String

Required: No

RetrievalToken

Retrieval token.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1020.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "NextToken": "string", "RetrievalStatus": "string", "Services": [ { "Links": [ { "DestinationTraceIds": [ "string" ], "ReferenceType": "string", "SourceTraceId": "string" } ], "Service": { "AccountId": "string", "DurationHistogram": [ { "Count": number, "Value": number } ], "Edges": [ { "Aliases": [ { "Name": "string", "Names": [ "string" ], "Type": "string" } ], "EdgeType": "string", "EndTime": number, "ReceivedEventAgeHistogram": [ { "Count": number, "Value": number } ], "ReferenceId": number, "ResponseTimeHistogram": [ { "Count": number, "Value": number } ], "StartTime": number, "SummaryStatistics": { "ErrorStatistics": { "OtherCount": number, "ThrottleCount": number, "TotalCount": number }, "FaultStatistics": { "OtherCount": number, "TotalCount": number }, "OkCount": number, "TotalCount": number, "TotalResponseTime": number } } ], "EndTime": number, "Name": "string", "Names": [ "string" ], "ReferenceId": number, "ResponseTimeHistogram": [ { "Count": number, "Value": number } ], "Root": boolean, "StartTime": number, "State": "string", "SummaryStatistics": { "ErrorStatistics": { "OtherCount": number, "ThrottleCount": number, "TotalCount": number }, "FaultStatistics": { "OtherCount": number, "TotalCount": number }, "OkCount": number, "TotalCount": number, "TotalResponseTime": number }, "Type": "string" } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

Specify the pagination token returned by a previous request to retrieve the next page of indexes.

Type: String

RetrievalStatus

Status of the retrieval.

Type: String

Valid Values: SCHEDULED | RUNNING | COMPLETE | FAILED | CANCELLED | TIMEOUT

Services

Retrieved services.

Type: Array of RetrievedService objects

Array Members: Minimum number of 0 items. Maximum number of 1000 items.

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidRequestException

The request is missing required parameters or has invalid parameters.

HTTP Status Code: 400

ResourceNotFoundException

The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is correct.

HTTP Status Code: 404

ThrottledException

The request exceeds the maximum number of requests per second.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: