Menu
AWS Step Functions
API Reference (API Version 2016-11-23)

GetExecutionHistory

Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the timeStamp of the events. Use the reverseOrder parameter to get the latest events first. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextToken returned by the previous call.

Request Syntax

Copy
{ "executionArn": "string", "maxResults": number, "nextToken": "string", "reverseOrder": boolean }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

executionArn

The Amazon Resource Name (ARN) of the execution.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Required: Yes

maxResults

The maximum number of results that will be returned per call. nextToken can be used to obtain further pages of results. The default is 100 and the maximum allowed page size is 100. A value of 0 means to use the default.

This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 1000.

Required: No

nextToken

If a nextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextToken. Keep all other arguments unchanged.

The configured maxResults determines how many results can be returned in a single call.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

reverseOrder

Lists events in descending order of their timeStamp.

Type: Boolean

Required: No

Response Syntax

Copy
{ "events": [ { "activityFailedEventDetails": { "cause": "string", "error": "string" }, "activityScheduledEventDetails": { "heartbeatInSeconds": number, "input": "string", "resource": "string", "timeoutInSeconds": number }, "activityScheduleFailedEventDetails": { "cause": "string", "error": "string" }, "activityStartedEventDetails": { "workerName": "string" }, "activitySucceededEventDetails": { "output": "string" }, "activityTimedOutEventDetails": { "cause": "string", "error": "string" }, "executionAbortedEventDetails": { "cause": "string", "error": "string" }, "executionFailedEventDetails": { "cause": "string", "error": "string" }, "executionStartedEventDetails": { "input": "string", "roleArn": "string" }, "executionSucceededEventDetails": { "output": "string" }, "executionTimedOutEventDetails": { "cause": "string", "error": "string" }, "id": number, "lambdaFunctionFailedEventDetails": { "cause": "string", "error": "string" }, "lambdaFunctionScheduledEventDetails": { "input": "string", "resource": "string", "timeoutInSeconds": number }, "lambdaFunctionScheduleFailedEventDetails": { "cause": "string", "error": "string" }, "lambdaFunctionStartFailedEventDetails": { "cause": "string", "error": "string" }, "lambdaFunctionSucceededEventDetails": { "output": "string" }, "lambdaFunctionTimedOutEventDetails": { "cause": "string", "error": "string" }, "previousEventId": number, "stateEnteredEventDetails": { "input": "string", "name": "string" }, "stateExitedEventDetails": { "name": "string", "output": "string" }, "timestamp": number, "type": "string" } ], "nextToken": "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.

events

The list of events that occurred in the execution.

Type: Array of HistoryEvent objects

nextToken

If a nextToken is returned, there are more results available. To retrieve the next page of results, make the call again using the returned token in nextToken. Keep all other arguments unchanged.

The configured maxResults determines how many results can be returned in a single call.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Errors

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

ExecutionDoesNotExist

The specified execution does not exist.

HTTP Status Code: 400

InvalidArn

The provided Amazon Resource Name (ARN) is invalid.

HTTP Status Code: 400

InvalidToken

The provided token is invalid.

HTTP Status Code: 400

See Also

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