ListSnapshotBlocks - EBS direct APIs


Returns information about the blocks in an Amazon Elastic Block Store snapshot.

Request Syntax

GET /snapshots/snapshotId/blocks?maxResults=MaxResults&pageToken=NextToken&startingBlockIndex=StartingBlockIndex HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


The number of results to return.

Valid Range: Minimum value of 100. Maximum value of 10000.


The token to request the next page of results.

Length Constraints: Maximum length of 256.

Pattern: ^[A-Za-z0-9+/=]+$


The ID of the snapshot from which to get block indexes and block tokens.

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

Pattern: ^snap-[0-9a-f]+$

Required: Yes


The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.

Valid Range: Minimum value of 0.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Blocks": [ { "BlockIndex": number, "BlockToken": "string" } ], "BlockSize": number, "ExpiryTime": number, "NextToken": "string", "VolumeSize": number }

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.


An array of objects containing information about the blocks.

Type: Array of Block objects


The size of the blocks in the snapshot, in bytes.

Type: Integer


The time when the BlockToken expires.

Type: Timestamp


The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Type: String

Length Constraints: Maximum length of 256.

Pattern: ^[A-Za-z0-9+/=]+$


The size of the volume in GB.

Type: Long

Valid Range: Minimum value of 1.


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


You do not have sufficient access to perform this action.

HTTP Status Code: 403


An internal error has occurred.

HTTP Status Code: 500


The number of API requests has exceed the maximum allowed API request throttling limit.

HTTP Status Code: 400


The specified resource does not exist.

HTTP Status Code: 404


Your current service quotas do not allow you to perform this action.

HTTP Status Code: 402


The input fails to satisfy the constraints of the EBS direct APIs.

HTTP Status Code: 400

See Also

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