| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
This operation downloads the output of the job you initiated using Initiate a Job (POST jobs). Depending on the job type you specified when you initiated the job, the output will be either the content of an archive or a vault inventory.
You can download all the job output or download a portion of the output by specifying a byte range. In the case of an archive retrieval job, depending on the byte range you specify, Amazon Glacier returns the checksum for the portion of the data. You can compute the checksum on the client and verify that the values match to ensure the portion you downloaded is the correct data.
A job ID will not expire for at least 24 hours after Amazon Glacier completes the job. That is, you can download the job output within the 24-hour period after Amazon Glacier completes the job.
To retrieve a job output, you send the HTTP GET request to the URI of the
output of the specific job.
GET /AccountId/vaults/VaultName/jobs/JobID/output HTTP/1.1 Host: glacier.Region.amazonaws.com Date:DateAuthorization:SignatureValueRange:ByteRangeToRetrievex-amz-glacier-version: 2012-06-01
Note
The AccountId is the AWS Account ID. This value must match the AWS Account ID associated with the credentials used to sign the request. You can either specify AWS Account ID or optionally a '-' in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include dashes in it.
This operation does not use request parameters.
This operation uses the following request headers, in addition to the request headers that are common to all operations. For more information about the common request headers, see Common Request Headers.
| Name | Description | Required |
|---|---|---|
Range
|
The range of bytes to retrieve from the output. For example, if you want to download
the first 1,048,576 bytes, specify If the job output is large, then you can use the
Type: String Default: None Constraints: None | No |
This operation does not have a request body.
For a retrieval request that returns all of the job data, the job output response returns a
200 OK response code. When partial content is requested, for
example, if you specified the Range header in the request, then the
response code 206 Partial Content is returned.
HTTP/1.1 200 OK x-amzn-RequestId: x-amzn-RequestId Date: Date Content-Type: ContentType Content-Length: Length x-amz-sha256-tree-hash: ChecksumComputedByAmazonGlacier [Body containing job output.]
| Header | Description |
|---|---|
Content-Range
|
The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, For more information about the Type: String |
Content-Type
|
The Content-Type depends on whether the job output is an archive or a vault inventory.
Type: String |
x-amz-sha256-tree-hash |
The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears when the retrieved data range requested in the Initiate Job request is tree hash aligned and the range to download in the Get Job Output is also tree hash aligned. For more information about tree hash aligned ranges, see Receiving Checksums When Downloading Data. For example, if in your Initiate Job request you specified a tree hash aligned range to retrieve (which includes the whole archive), then you will receive the checksum of the data you download under the following conditions:
Type: String |
Amazon Glacier returns the job output in the response body. Depending on the job type, the output can be the archive contents or the vault inventory. In case of a vault inventory, by default the inventory list is returned as the following JSON body. If you requested CSV format when you initiated the vault inventory job, then the vault inventory is returned in CSV format in the body. The CSV format has five columns "ArchiveId", "ArchiveDescription", "CreationDate", "Size", and "SHA256TreeHash" with the same definitions as the corresponding JSON fields.
{
"VaultARN": String,
"InventoryDate": String,
"ArchiveList": [
{"ArchiveId": String,
"ArchiveDescription": String,
"CreationDate": String,
"Size": Number,
"SHA256TreeHash": String
},
...
]
}
The response body contains the following JSON fields.
The description of an archive.
Type: String
The ID of an archive.
Type: String
An array of archive metadata. Each object in the array represents metadata for one archive contained in the vault.
Type: Array
The UTC date and time the archive was created.
Type: A string representation of ISO 8601 date format, for example, 2012-03-20T17:03:43.221Z.
The UTC date and time of the last inventory for the vault that was completed after changes to the vault. Even though Amazon Glacier prepares a vault inventory once a day, the inventory date is only updated if there have been archive additions or deletions to the vault since the last inventory.
Type: A string representation of ISO 8601 date format, for example, 2012-03-20T17:03:43.221Z.
The tree hash of the archive.
Type: String
The size in bytes of the archive.
Type: Number
The Amazon Resource Name (ARN) resource from which the archive retrieval was requested.
Type: String
For information about Amazon Glacier exceptions and error messages, see Error Responses.
The following example shows the request for a job that retrieves an archive.
This example retrieves data prepared by Amazon Glacier in response to your initiate archive retrieval job request.
GET /-/vaults/examplevault/jobs/HkF9p6o7yjhFx-K3CGl6fuSm6VzW9T7esGQfco8nUXVYwS0jlb5gq1JZ55yHgt5vP54ZShjoQzQVVh7vEXAMPLEjobID/output HTTP/1.1 Host: glacier.us-east-1.amazonaws.com x-amz-Date: 20120325T120000Z x-amz-glacier-version: 2012-06-01 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120525/us-east-1/glacier/aws4_request,SignedHeaders=host;x-amz-date;x-amz-glacier-version,Signature=9257c16da6b25a715ce900a5b45b03da0447acf430195dcb540091b12966f2a2
The following is an example response of an archive retrieval job. Note that the
Content-Type header is application/octet-stream
and that x-amz-sha256-tree-hash header is included in the response,
which means that all the job data is returned.
HTTP/1.1 200 OK x-amzn-RequestId: AAABZpJrTyioDC_HsOmHae8EZp_uBSJr6cnGOLKp_XJCl-Q x-amz-sha256-tree-hash: beb0fe31a1c7ca8c6c04d574ea906e3f97b31fdca7571defb5b44dca89b5af60 Date: Sun, 25 Mar 2012 12:00:00 GMT Content-Type: application/octet-stream Content-Length: 1048576 [Archive data.]
The following is an example response of an inventory retrieval job. Note that the
Content-Type header is application/json. Also note
that the response does not include the x-amz-sha256-tree-hash
header.
HTTP/1.1 200 OK
x-amzn-RequestId: AAABZpJrTyioDC_HsOmHae8EZp_uBSJr6cnGOLKp_XJCl-Q
Date: Sun, 25 Mar 2012 12:00:00 GMT
Content-Type: application/json
Content-Length: 906
{
"VaultARN": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault",
"InventoryDate": "2011-12-12T14:19:01Z",
"ArchiveList": [
{
"ArchiveId": "DMTmICA2n5Tdqq5BV2z7og-A20xnpAPKt3UXwWxdWsn_D6auTUrW6kwy5Qyj9xd1MCE1mBYvMQ63LWaT8yTMzMaCxB_9VBWrW4Jw4zsvg5kehAPDVKcppUD1X7b24JukOr4mMAq-oA",
"ArchiveDescription": "my archive1",
"CreationDate": "2012-05-15T17:19:46.700Z",
"Size": 2140123,
"SHA256TreeHash": "6b9d4cf8697bd3af6aa1b590a0b27b337da5b18988dbcc619a3e608a554a1e62"
},
{
"ArchiveId": "2lHzwhKhgF2JHyvCS-ZRuF08IQLuyB4265Hs3AXj9MoAIhz7tbXAvcFeHusgU_hViO1WeCBe0N5lsYYHRyZ7rrmRkNRuYrXUs_sjl2K8ume_7mKO_0i7C-uHE1oHqaW9d37pabXrSA",
"ArchiveDescription": "my archive2",
"CreationDate": "2012-05-15T17:21:39.339Z",
"Size": 2140123,
"SHA256TreeHash": "7f2fe580edb35154041fa3d4b41dd6d3adaef0c85d2ff6309f1d4b520eeecda3"
}
]
}This example retrieves only a portion of the archive prepared by Amazon Glacier in response to
your initiate archive retrieval job request. The request uses the optional
Range header to retrieve only the first 1,024 bytes.
GET /-/vaults/examplevault/jobs/HkF9p6o7yjhFx-K3CGl6fuSm6VzW9T7esGQfco8nUXVYwS0jlb5gq1JZ55yHgt5vP54ZShjoQzQVVh7vEXAMPLEjobID/output HTTP/1.1 Host: glacier.us-east-1.amazonaws.com x-amz-Date: 20120325T120000Z Range: bytes=0-1023 x-amz-glacier-version: 2012-06-01 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120525/us-east-1/glacier/aws4_request,SignedHeaders=host;x-amz-date;x-amz-glacier-version,Signature=9257c16da6b25a715ce900a5b45b03da0447acf430195dcb540091b12966f2a2
The following successful response shows the 206 Partial Content response. In
this case, the response also includes a Content-Range header that
specifies the range of bytes Amazon Glacier returns.
HTTP/1.1 206 Partial Content x-amzn-RequestId: AAABZpJrTyioDC_HsOmHae8EZp_uBSJr6cnGOLKp_XJCl-Q Date: Sun, 25 Mar 2012 12:00:00 GMT Content-Range: bytes 0-1023/8388608 Content-Type: application/octet-stream Content-Length: 1024 [Archive data.]