History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
GET /for-test.mp4?ci-process=filehash&type=md5 HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>
Node Name (Keyword) | Description | Type | Required |
ci-process | Operation type. It is fixed at filehash for hash calculation. | String | Yes |
type | Supported hash algorithm. Valid values: md5, sha1, sha256 | String | Yes |
addtoheader | Whether to automatically add the calculated hash value to the custom header in the file. Format: x-cos-meta-md5/sha1/sha256 Valid values: true, false. If this parameter is left empty, it is false by default. | String | No |
<Response><FileHashCodeResult><MD5>0fe771ba515b0525552f59290a50c0ef</MD5><FileSize>1048576</FileSize></FileHashCodeResult><Input><Bucket>test-1234567890</Bucket><Object>wg.txt</Object><Region>ap-chongqing</Region></Input></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None | Result storage container | Container |
Response has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type |
FileHashCodeResult | Response | File hash result | Container |
Input | Response | Basic information of the input file | Container |
FileHashCodeResult has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type |
MD5 | Response.FileHashCodeResult | This field is returned if type in the request is md5. | String |
SHA1 | Response.FileHashCodeResult | This field is returned if type in the request is sha1. | String |
SHA256 | Response.FileHashCodeResult | This field is returned if type in the request is sha256. | String |
FileSize | Response.FileHashCodeResult | File size | Int |
Input has the following sub-nodes:Node Name (Keyword) | Parent Node | Description | Type |
Region | Response.JobsDetail.Input | Region of the bucket | String |
Bucket | Response.JobsDetail.Input | Bucket where the input file resides | String |
Object | Response.JobsDetail.Input | Name of the input file in the bucket | String |
GET /for-test.mp4?ci-process=filehash&type=md5 HTTP/1.1Host: test-1234567890.cos.ap-beijing.myqcloud.comAuthorization: q-sign-algorithm=sha1&q-ak=AKIDWtTCBYjM5OwLB9CAwA1Qb2ThTSUjfG****-sign-time=1484213027;32557109027&q-key-time=1484213027;32557109027&q-header-list=host&q-url-param-list=acl&q-signature=dcc1eb2022b79cb2a780bf062d3a40e120b4****Content-Length: 0
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 666Connection: keep-aliveDate: Mon, 28 Jun 2022 15:23:12 GMTServer: tencent-cosx-cos-request-id: NTg3NzRiMjVfYmRjMzVfMTViMl82ZGZmNw==<Response><FileHashCodeResult><MD5>0fe771ba515b0525552f59290a50c0ef</MD5><FileSize>1048576</FileSize><LastModified>2022-06-27T15:23:12+0800</LastModified><Etag>"ee8de918d05640145b18f70f4c3aa602"</Etag></FileHashCodeResult><Input><Bucket>test-1234567890</Bucket><Object>wg.txt</Object><Region>ap-chongqing</Region></Input></Response>
피드백