POST Object restore
API allows you to send a request to restore an ARCHIVE/DEEP ARCHIVE object so that you can read it. The restored readable object is a temporary copy, for which you can set the readable status and the time to delete it through the Days
parameter. If the time has elapsed and you haven't initiated a copy or extension operation, the temporary object will be automatically deleted. Temporary objects are only copies of the archived objects which always exist. For more information on the ARCHIVE storage class, see Overview.POST Object restore
API is limited to 100.versionId
parameter in your request to specify the ID of the version to be restored. If this parameter is not specified, the latest version will be restored.POST /<ObjectKey>?restore HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Type: application/xmlContent-Length: Content LengthContent-MD5: MD5Authorization: Auth String[Request Body]
APPID
, such as examplebucket-1250000000
(see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).Field | Description | Type | Required |
versionId | Specifies the version ID of the versioning-enabled object to restore. If this parameter is not specified, the latest version will be restored. | string | No |
<RestoreRequest><Days>number</Days><CASJobParameters><Tier>Enum</Tier></CASJobParameters></RestoreRequest>
Node Name (Keyword) | Parent Node | Description | Type | Required |
RestoreRequest | None | Contains all the request information of POST Object restore . | Container | Yes |
RestoreRequest
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
Days | RestoreRequest | Specifies the validity period (in days) of the restored temporary copy. | number | Yes |
CASJobParameters | RestoreRequest | Restoration job parameter. | Container | Yes |
CASJobParameters
has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type | Required |
Tier | RestoreRequest.CASJobParameters | Specifies the restoration mode. The following three restoration modes are available for ARCHIVE objects: Expedited: Restores an object within 1–5 minutes. Standard: Restores an object within 3–5 hours. Bulk: Restores an object within 5–12 hours. The following two restoration modes are available for DEEP ARCHIVE objects: Standard: Restores an object within 12–24 hours. Bulk: Restores an object within 24–48 hours. | Enum | Yes |
POST /exampleobject?restore HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 27 Dec 2019 08:19:29 GMTContent-Type: application/xmlContent-Length: 121Content-MD5: Nr7RAnRMgrplFvD8bt5+0w==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1577434769;1577441969&q-key-time=1577434769;1577441969&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=restore&q-signature=ed3ee8ca63689dbff4be1533fddc17c0b4d8****Connection: close<RestoreRequest><Days>1</Days><CASJobParameters><Tier>Expedited</Tier></CASJobParameters></RestoreRequest>
HTTP/1.1 202 AcceptedContent-Length: 0Connection: closeDate: Fri, 27 Dec 2019 08:19:29 GMTServer: tencent-cosx-cos-request-id: NWUwNWJlOTFfMjljOTBiMDlfMTQ2MmNfNzAw****
POST /exampleobject?restore&versionId=MTg0NDUxNjQ1NjM4OTkzNzY3NDk HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Mon, 20 Jan 2020 08:43:40 GMTContent-Type: application/xmlContent-Length: 121Content-MD5: Nr7RAnRMgrplFvD8bt5+0w==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1579509820;1579517020&q-key-time=1579509820;1579517020&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=restore;versionid&q-signature=f92b1c6753c452bed9ade49739ddb81a0a47****Connection: close<RestoreRequest><Days>1</Days><CASJobParameters><Tier>Expedited</Tier></CASJobParameters></RestoreRequest>
HTTP/1.1 202 AcceptedContent-Length: 0Connection: closeDate: Mon, 20 Jan 2020 08:43:41 GMTServer: tencent-cosx-cos-request-id: NWUyNTY4M2NfZTNjODJhMDlfMWZkM2VfNWZm****
Was this page helpful?