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

APIs

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-12-03 17:12:45

Do COS APIs support the S3 protocol?

COS provides APIs that are compatible with AWS S3. For more information, please see Accessing COS Using the AWS S3 SDK.

What do I do if an error message such as "Request has expired" is displayed when I call an API?

There are two possible causes:
The signature has expired when you initiate the request.
Your local system time is out of sync with the local time in your time zone.
For the former case, you are advised to get a new valid request signature before using the API. For the latter case, you need to sync your system time with the time in your time zone.

How do I call an API to delete an object that is not uploaded completely?

First, call the ListMultipartUploads API to list the multipart uploads. Then, call Abort Multipart upload to abort the multipart upload and delete the uploaded parts.

What do I do if a success response is returned for the batch deletion API, while the object failed to be deleted?

Check the object path, which should not start with a /.

What do I do if “NoSuchUpload” is returned for the UploadPart request?

If the values of uploadId and partNumber are the same, newly uploaded parts will overwrite previous ones. If uploadId does not exist, “404 NoSuchUpload” will be returned. For more information, please see Upload Part.

How do I modify the storage class for an object using an API?

You can call the PUT Object - Copy API to modify x-cos-storage-class. For more information, please see PUT Object - Copy.

How do I set the COS signature to be permanent?

A timestamp is used to determine whether the COS signature has expired and it cannot be set to permanent. If you use a permanent key to generate the signature and want the signature to be permanent, you can set the timestamp to be a long time (for example, 50 years) after the current time. If your signature is generated using a temporary key, which is valid for only up to 2 hours, your signature will also be valid for only 2 hours.

Can I call an API to query the COS bill?

No. You can go to the console and view Bill Details. To call APIs to view the bill details, please see DescribeBillDetail.

Can I call an API to query the size of an object?

Yes. You can call GET Bucket (List Objects) to query the size of an object.

Can I call an API to modify the name of an object?

You can call PUT Object - Copy to copy the object and specify a name for the replicas.

Can I call an API to query the bucket domain name?

You can call the HEAD Bucket API to query the bucket domain name. The x-cos-bucket-region parameter in the response header indicates the region where the bucket resides.

Can I call an API to query the bucket size?

COS does not provide an API to query the bucket size. You are advised to use Cloud Monitor APIs to query the storage by storage class, and then sum up the storage of each storage class to get the bucket size.

How can I call APIs to query the usage details?

You can:
1. Use the API request tool.

Does COS provide APIs to operate directories?

Technically speaking, COS does not have directories or folders. In fact, folders displayed in the console are empty objects whose names end with a slash (/).

How can I create a directory/folder using APIs?

You can call the PUT Object API and upload an empty object whose name ends with a slash (/).
Note:
COS does not have the concepts of directories or folders. To make COS more user-friendly, COS simulates folders/directories in GUIs such as the console and COSBrowser. You can create an empty object whose name ends with a slash (/), and it will be displayed as a folder.

How can I call APIs to delete a directory/folder?

COS APIs support only deleting a single file. If you need to delete the entire directory, you can call the GET Bucket (List Objects) API to obtain the list of all objects that have the same specified prefix. Then, call DELETE Object to delete them.

How to know on which access tier my INTELLIGENT TIERING object is stored?

You can use x-cos-storage-tier returned for the HEAD Object API to query the access tier of your object.

How can I call APIs to search for an object?

You can call HEAD Object to determine whether the object exists. To search for a specific object, call Get Bucket to query all objects in the bucket and find your object.

When I call the GET Object API, can I download the dynamically specified content that is returned as an attachment?

When you call GET Object, carry the response-content-disposition parameter in the URL and set its value to attachment. Note that this kind of GET Object requests require a signature carried. You can generate a signature using COS’s signature generation tool.

What do I do if “NoSuchKey” is returned for the putObjectCopy request?

Check whether the file exists. If yes, the error is usually caused because the slash (/) is missing from the folder’s key. You can add the slash and then retry.

Can I call an API to query how many times an object is requested?

COS does not provide such an API. However, you can Set Logging and then obtain the requested times by analyzing the logs.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan