Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

GetObjectTorrent

Return torrent files from a bucket. BitTorrent can save you bandwidth when you're distributing large files. For more information about BitTorrent, see Amazon S3 Torrent.

Note

You can get torrent only for objects that are less than 5 GB in size and that are not encrypted using server-side encryption with customer-provided encryption key.

To use GET, you must have READ access to the object.

The following operation is related to GetObjectTorrent:

Request Syntax

GET /{Key+}?torrent HTTP/1.1 Host: Bucket.s3.amazonaws.com x-amz-request-payer: RequestPayer

URI Request Parameters

The request requires the following URI parameters.

Bucket

The name of the bucket containing the object for which to get the torrent files.

Key

The object key for which to get the information.

Length Constraints: Minimum length of 1.

x-amz-request-payer

Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests. Documentation on downloading objects from requester pays buckets can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html

Valid Values: requester

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 x-amz-request-charged: RequestCharged Body

Response Elements

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

The response returns the following HTTP headers.

x-amz-request-charged

If present, indicates that the requester was successfully charged for the request.

Valid Values: requester

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

Body

Examples

Getting Torrent Files in a Bucket

This example retrieves the Torrent file for the "Nelson" object in the "quotes" bucket.

GET /quotes/Nelson?torrent HTTP/1.0 Host: bucket.s3.amazonaws.com Date: Wed, 28 Oct 2009 22:32:00 GMT Authorization: authorization string

Sample Response

HTTP/1.1 200 OK x-amz-request-id: 7CD745EBB7AB5ED9 Date: Wed, 25 Nov 2009 12:00:00 GMT Content-Disposition: attachment; filename=Nelson.torrent; Content-Type: application/x-bittorrent Content-Length: 537 Server: AmazonS3 <body: a Bencoded dictionary as defined by the BitTorrent specification>

See Also

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