tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

POST Object restore

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-11-08 10:55:51

Feature Description

The 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.
Note:
The QPS of the POST Object restore API is limited to 100.


Versioning

If versioning is enabled, you can use the 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.

Request

Sample request

POST /<ObjectKey>?restore HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: GMT Date
Content-Type: application/xml
Content-Length: Content Length
Content-MD5: MD5
Authorization: Auth String



[Request Body]
Note:
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com, where <BucketName-APPID> is the bucket name followed by the 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).
Authorization: Auth String (for more information, see Request Signature).

Request parameters

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

Request headers

This API only uses common request headers. For more information, see Common Request Headers.

Request body

Submit application/xml request data, including specific parameters of the restoration operation.
<RestoreRequest>
<Days>number</Days>
<CASJobParameters>
<Tier>Enum</Tier>
</CASJobParameters>
</RestoreRequest>
The nodes are as described below:
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

Response

Response headers

This API only returns common response headers. For more information, see Common Response Headers.

Response body

The response body of this API is empty.

Error codes

This API returns common error responses and error codes. For more information, see Error Codes.

Samples

Sample 1: Simple use case (with versioning disabled)

Request

POST /exampleobject?restore HTTP/1.1
Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
Date: Fri, 27 Dec 2019 08:19:29 GMT
Content-Type: application/xml
Content-Length: 121
Content-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>

Response

HTTP/1.1 202 Accepted
Content-Length: 0
Connection: close
Date: Fri, 27 Dec 2019 08:19:29 GMT
Server: tencent-cos
x-cos-request-id: NWUwNWJlOTFfMjljOTBiMDlfMTQ2MmNfNzAw****

Sample 2: Restoring an object on a specific version (with versioning enabled)

Request

POST /exampleobject?restore&versionId=MTg0NDUxNjQ1NjM4OTkzNzY3NDk HTTP/1.1
Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
Date: Mon, 20 Jan 2020 08:43:40 GMT
Content-Type: application/xml
Content-Length: 121
Content-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>

Response

HTTP/1.1 202 Accepted
Content-Length: 0
Connection: close
Date: Mon, 20 Jan 2020 08:43:41 GMT
Server: tencent-cos
x-cos-request-id: NWUyNTY4M2NfZTNjODJhMDlfMWZkM2VfNWZm****


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan