You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Bucket Inventory
GetBucketInventory
Copy page
Download PDF
GetBucketInventory
Description​
This interface is used to view the specified bucket inventory rules in a bucket.​
Request syntax​
​
GET /?inventory&id=report HTTP/1.1​
Host: BucketName.tos-cn-beijing.volces.com​
Date: Sat, 07 Oct 2023 09:53:11 GMT​
Authorization: authorization string​
​
Request parameters and headers​
For common request headers, see Common Parameters.​
​
Name​
Location​
Type​
Required​
Sample Value​
Description​
inventory​
Query​
String​
Yes​
-​
A special identifier representing a GetBucketInventory request.​
id​
Query​
String​
Yes​
report​
Bucket inventory name.​
​
Request body elements​
No elements are used.​
Response headers​
For common response headers, see Common Parameters.​
Response body elements​
​
Name​
Type​
Sample Value​
Description​
InventoryConfiguration​
Array​
-​
Bucket inventory rules.​
Id​
String​
report​
Bucket inventory name.​
IsEnabled​
Bool​
true​
Whether to enable the bucket inventory feature. The values are as follows:​
  • True: Enable the bucket inventory feature.​
  • False: The bucket inventory feature is not enabled.​
Destination​
Array​
-​
Information about the manifest file.​
TOSBucketDestination​
Array​
-​
Bucket-related information for the manifest file.​
Parent Node: Destination​
Role​
String​
TosArchiveTOSInventory​
Role name that grants the object store permission to read all files in the source bucket and write files to the target bucket. This role must have TOS read and write permissions and service access, or you can use the TOS default role TosArchiveTOSInventory.​
Format​
String​
CSV​
The format of the manifest file. The value is CSV, that is, the format of the manifest file is CSV format compressed using GZIP.​
Parent Node: TOSBucketDestination​
AccountId​
String​
200000****​
The account ID of the bucket owner.​
Parent Node: TOSBucketDestination​
Bucket​
String​
bucket_0001​
The bucket where the manifest file is saved.​
Parent Node: TOSBucketDestination​
Prefix​
String​
prefix1​
The storage path prefix for the manifest file.​
Parent Node: TOSBucketDestination​
Schedule​
Array​
-​
Bucket inventory export cycle information.​
Frequency​
String​
Daily​
Cycle of the manifest file export. The values are as follows:​
  • Daily: Export manifest files by day.​
  • Weekly: Export manifest files by week.​
  • Once:Export manifest files all at once.​
Parent Node: Schedule​
Instant​
Bool​
true​
Whether to enable the instant inventory feature. The values are as follows:​
  • true:Enable the instant inventory feature.​
  • false:The instant inventory feature is not enabled.​
Parent Node: Schedule​
IncludedObjectVersions​
String​
All​
The exported object version. The values are as follows:​
  • All: Export all versions of object information.​
  • Current: Exports the current version of the object information.​
Filter​
Array​
-​
Prefix for bucket list filtering. After specifying the prefix, the bucket manifest exports objects that match the prefix setting.​
Prefix​
String​
Pics/​
Export file prefix matching information, if not set, a manifest of all objects in the bucket is generated by default.​
Parent Node: Filter​
OptionalFields​
Array​
-​
Information exported from the manifest file.​
Field​
String​
Size​
The manifest file needs to export the information. Multiple selection is supported, and the values are as follows:​
  • Size: The size of the object.​
  • LastModifiedDate: The last modification time of the object.​
  • ETag: The ETag value of the object, used to identify the content of the object.​
  • StorageClass: The storage type of the object.​
  • IsMultipartUploaded: Whether it is an object uploaded by sharding.​
  • EncryptionStatus: Whether the object is encrypted.​
  • ReplicationStatus: Cross-region replication or co-region replication status of the object.​
Parent Node: OptionalFields​
​
Sample request​
​
GET /?inventory&id=report HTTP/1.1​
Date: Sat, 07 Oct 2023 09:02:23 GMT​
Host: BucketName.tos-cn-beijing.volces.com​
Authorization: authorization string​
​
Sample response​
​
HTTP/1.1 200 OK​
Date: Sat, 07 Oct 2023 09:02:23 GMT​
Server: TosServer​
x-tos-id-2: 1e89f203jld00006-a444fd0​
x-tos-request-id: 1e89f203b2d00006-a444ed0​
Content-Length: 621​
​
{​
"InventoryConfiguration": {​
"Id": "report",​
"IsEnabled": "true",​
"Filter": {​
"Prefix": "Pics/",​
},​
"Destination": {​
"TOSBucketDestination": {​
"Format": "CSV",​
"AccountId": "200000****",​
"Role": "TosArchiveTOSInventory", ​
"Bucket": "destination-bucket",​
"Prefix": "prefix1",​
"Encryption": {​
"SSE-TOS": { }​
}​
}​
},​
"Schedule": { "Frequency": "Daily" },​
"IncludedObjectVersions": "All",​
"OptionalFields": {​
"Field": [​
"Size",​
"LastModifiedDate",​
"ETag",​
"StorageClass",​
"IsMultipartUploaded",​
"EncryptionStatus"​
]​
}​
}​
}​
​
​
Last updated: 2025.12.30 11:39:35