All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Restore Object

Last updated:2021-09-14 16:18:18

Description

This interface is used to unfreeze the Archive Object. Authorization of this interface to a child user is currently not supported.

This interface is only for unfreezing of Object of archive type. If an Object is a standard or infrequent access type, do not call the interface.

Archive Type Object Status Description

  1. Upload the file to the archive storage Bucket. The file is automatically stored as the archive object and is in the frozen state.
  2. After submitting a Restore operation, the Object will be in the unfreezing state, and the server will unfreeze. The unfreezing task takes 1 to 10 minutes to complete.
  3. After the server finishes the unfreezing task, the Object will enter the unfreezing state. At this time, the user can read the Object.
  4. The unfreezing status lasts for 24 hours by default. If the Restore Object interface is called again within 24 hours, the unfreezing status will be automatically extended for 24 hours, up to 7 days. After that, the Object will return to the original frozen status.

Description of expenses incurred by unfreezing operation:

  • Performing a Restore operation on a frozen Object will result in a data retrieval fee.
  • Unfreezing state can be prolonged for up to 7 days. Data retrieval fees will not be charged repeatedly during this period.
  • After the unfreezing state is over, the Object returns to the frozen state. For the first data read after unfreezing again, a data retrieval fee will be charged.
  • Every call to the Restore Object interface will result in a request cost.

Request

Syntax

The following shows the unfreezing request for an archive file

POST /{ObjectKey}?restore HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}

Attention:

Request Parameters

The interface does not use request parameters.

Request Headers

This interface can use all common request headers. For more information, please click Public Request Headers.

Response

Response Headers

This interface can use all common response headers. For more information, please click Public Response Headers.

Examples

Notes

  • If the RestoreObject interface is called for the first time for an archived object, 202 is returned.
  • If the RestoreObject interface has been successfully called, and the Object is still in the process of unfreezing, 409 will be returned when calling again, and the error code is: RestoreAlreadyInProgress, indicating that the server is executing the unfreezing operation, and the user only needs to wait for the unfreezing to complete, with a maximum waiting time of 10 minutes.
  • If the RestoreObject interface has been successfully called, and the server has finished unfreezing, 200 will be returned when calling again, and the downloadable time of the archive file will be extended by one day, up to 7 days.
  • If the file does not exist, 404 is returned.
  • If the unfreezing operation is submitted for a file of non archive type, 400 will be returned with the error code: OperationNotSupported.

First Time Submit Request Example

POST /restore_test.txt?restore HTTP/1.1
Host: test-arc-12/ks3-cn-shanghai-internal.ksyuncs.com
Date: Fri, 26 Dec 2018 06:34:32 GMT
Authorization:KSS authorization string

Sample Response

HTTP/1.1 202 Accepted
Server: Tengine
Date: Fri, 26 Dec 2018 06:34:32 GMT
Content-Length: 0
Connection: keep-alive
X-Application-Context: application
x-kss-request-id: cb2a95d037794c0293be0a094375c047
x-kss-storage-class: ARCHIVE

Submit the Request Example Again If the Reunfreezing Operation Is Not Completed

POST /restore_test.txt?restore HTTP/1.1
Host: test-arc-12/ks3-cn-shanghai-internal.ksyuncs.com
Date: Fri, 26 Dec 2018 06:35:02 GMT
Authorization:KSS authorization string

Sample Response

HTTP/1.1 409 Conflict
Server: Tengine
Date: Fri, 26 Dec 2018 06:35:02 GMT
Content-Type: application/xml
Transfer-Encoding: chunked
Connection: keep-alive
X-Application-Context: application
x-kss-request-id: 79516a04224b423181f20f3dcbf2f416
x-kss-StorageClass: -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Error>
    <Code>RestoreAlreadyInProgress</Code>
    <Message>Object restore is already in progress.</Message>
    <Resource>/test-arc-12/restore_test1.txt?restore</Resource>
    <RequestId>79516a04224b423181f20f3dcbf2f416</RequestId>
</Error>

After Unfreezing Submit A Third Request Example

POST /restore_test.txt?restore HTTP/1.1
Host: test-arc-12/ks3-cn-shanghai-internal.ksyuncs.com
Date: Fri, 26 Dec 2018 06:40:02 GMT
Authorization:KSS authorization string

Sample Response

HTTP/1.1 200 OK
Server: Tengine
Date: Fri, 26 Dec 2018 06:40:02 GMT
Content-Length: 0
Connection: keep-alive
X-Application-Context: application
x-kss-request-id: 1d147c34a9d542aa8dc7f0f70d3db893
x-kss-storage-class: ARCHIVE
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback