Menu
Amazon Kinesis Video Streams
Developer Guide

ListFragments

Returns a list of Fragment objects from the specified stream and start location within the archived data.

Request Syntax

POST /listFragments HTTP/1.1 Content-type: application/json { "FragmentSelector": { "FragmentSelectorType": "string", "TimestampRange": { "EndTimestamp": number, "StartTimestamp": number } }, "MaxResults": number, "NextToken": "string", "StreamName": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

FragmentSelector

Describes the time stamp range and time stamp origin for the range of fragments to return.

Type: FragmentSelector object

Required: No

MaxResults

The total number of fragments to return. If the total number of fragments available is more than the value specified in max-results, then a ListFragments:NextToken is provided in the output that you can use to resume pagination.

Type: Long

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

Required: No

NextToken

A token to specify where to start paginating. This is the ListFragments:NextToken from a previously truncated response.

Type: String

Length Constraints: Minimum length of 1.

Required: No

StreamName

The name of the stream from which to retrieve a fragment list.

Type: String

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

Pattern: [a-zA-Z0-9_.-]+

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Fragments": [ { "FragmentLengthInMilliseconds": number, "FragmentNumber": "string", "FragmentSizeInBytes": number, "ProducerTimestamp": number, "ServerTimestamp": number } ], "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.

Fragments

A list of fragment numbers that correspond to the time stamp range provided.

Type: Array of Fragment objects

NextToken

If the returned list is truncated, the operation returns this 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: Minimum length of 1.

Errors

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

ClientLimitExceededException

Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.

HTTP Status Code: 400

InvalidArgumentException

A specified parameter exceeds its restrictions, is not supported, or can't be used.

HTTP Status Code: 400

NotAuthorizedException

Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired.

HTTP Status Code: 401

ResourceNotFoundException

Kinesis Video Streams can't find the stream that you specified.

HTTP Status Code: 404

See Also

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