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

Torch Object Storage

Copy page
Download PDF
Bucket Inventory
ListBucketInventory
Copy page
Download PDF
ListBucketInventory
Description​
This interface is used to batch retrieve all inventory rules in a bucket.​
Request syntax​
​
GET /?inventory HTTP/1.1​
Host: BucketName.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
Authorization: authorization string​
​
Request parameters and headers​
This request uses the common request headers; see Common parameters.​
​
Name​
Location​
Type​
Required​
Sample value​
Note​
inventory​
Query​
String​
Yes​
-​
Special identifier representing the ListBucketInventory request.​
continuation-token​
Query​
String​
No​
next_inventory_id​
Set the continuation-token to continue listing the bucket inventory from the last returned list instead of starting over.​
​
Request body elements​
No elements are used.​
Response headers​
This request returns the common response headers; see Common parameters.​
Response body elements​
​
Name​
Type​
Sample value​
Note​
ListInventoryConfigurationsResult​
Array​
-​
List the results of the bucket inventory rules.​
InventoryConfiguration​
Array​
-​
Bucket inventory rules.​
IsTruncated​
Bool​
true​
Whether to list all inventory tasks. The options are as follows:​
  • true: Not all inventory tasks in the bucket are listed. You can use the value of the NextContinuationToken field as the continuation-token parameter for the next request to get the next page of inventory configurations.​
  • false: All inventory tasks in the bucket are fully listed.​
NextContinuationToken​
String​
next_inventory_id​
This field is returned when the inventory tasks in the bucket are not listed completely. You can use this field as the continuation-token parameter for the next request to retrieve the next page of the bucket inventory configuration list.​
Id​
String​
report​
Bucket inventory name.​
IsEnabled​
Bool​
true​
Enable the bucket inventory feature. Valid values:​
  • true: Enable the bucket inventory feature.​
  • false: Disable the bucket inventory feature.​
Destination​
Array​
-​
Information related to the inventory file.​
TOSBucketDestination​
Array​
-​
Bucket-related information of the inventory file.​
Parent node: Destination​
Role​
String​
TosArchiveTOSInventory​
Role name used to grant permission to read all files from the source bucket and write files to the target bucket in object storage. This role must have read and write permissions for TOS and service access rights. You can also use the default TOS role TosArchiveTOSInventory.​
Format​
String​
CSV​
Format of the inventory file. Value CSV means the inventory file format is CSV compressed with GZIP.​
Parent node: TOSBucketDestination​
AccountId​
String​
200000****​
The account ID of the bucket owner.​
Parent node: TOSBucketDestination​
Bucket​
String​
bucket_0001​
The bucket to save the manifest file.​
Parent node: TOSBucketDestination​
Prefix​
String​
prefix1​
Storage path prefix of the inventory file.​
Parent node: TOSBucketDestination​
Schedule​
Array​
-​
Bucket list export cycle information.​
Frequency​
String​
Daily​
Inventory file export cycle. Valid values:​
  • Daily: Export the inventory file daily.​
  • Weekly: Export the inventory file weekly.​
Parent node: Schedule​
IncludedObjectVersions​
String​
All​
Exported object versions. Valid values:​
  • All: Export object information for all versions.​
  • Current: Export object information for the current version.​
Filter​
Array​
-​
Prefix for bucket list filtering. After specifying the prefix, the bucket list will export objects matching the prefix setting.​
Prefix​
String​
Pics/​
Export file prefix matching information. If not set, the manifest will include all objects in the bucket by default.​
Parent node: Filter​
OptionalFields​
Array​
-​
Information exported from the inventory file.​
Field​
String​
Size​
Information to be exported in the inventory file. Supports multiple selections, with the following options:​
  • Size: The size of the object.​
  • LastModifiedDate: The last modification date of the object.​
  • ETag: The ETag value of the object, used to identify the object's content.​
  • StorageClass: The storage type of the object.​
  • IsMultipartUploaded: Whether the object was uploaded via multipart upload.​
  • EncryptionStatus: Whether the object is encrypted.​
  • CRC64: The CRC64 value of the object.​
  • ReplicationStatus: The cross-region or same-region replication status of the object.​
  • Tag: The object tag.​
  • RetentionMode: The retention mode.​
  • RetainUntilTimestamp: Retention expiration time.​
Parent node: OptionalFields​
​
Sample request​
​
GET /?inventory HTTP/1.1​
Host: BucketName.tos-cn-beijing.volces.com​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
Authorization: authorization string​
​
Sample response​
​
HTTP/1.1 200 OK​
x-tos-id-2: 4fac130beeb50032-a444ed0​
x-tos-request-id: 4fac130beeb50032-a444ed0​
Date: Fri, 30 Jul 2021 13:59:18 GMT​
server: TosServer​
Content-Length: 1429​
​
{​
"ListInventoryConfigurationsResult": {​
"InventoryConfiguration": [​
{​
"Id": "report",​
"IsEnabled": "true",​
"Filter": { "Prefix": "Pics/" },​
"Destination": {​
"TOSBucketDestination": {​
"Format": "CSV",​
"AccountId": "200000****",​
"Role": "TosArchiveTOSInventory",​
"Bucket": "test23",​
"Prefix": "prefix1"​
}​
},​
"Schedule": { "Frequency": "Daily" },​
"IncludedObjectVersions": "Current",​
"OptionalFields": {​
"Field": [​
"Size",​
"StorageClass"​
]​
}​
},​
{​
"Id": "report1",​
"IsEnabled": "true",​
"Filter": { "Prefix": "fast" },​
"Destination": {​
"TOSBucketDestination": {​
"Format": "CSV",​
"AccountId": "200000****",​
"Role": "TosArchiveTOSInventory",​
"Bucket": "test12",​
"Prefix": "tos_bucket_inventory"​
}​
},​
"Schedule": { "Frequency": "Weekly" },​
"IncludedObjectVersions": "Current",​
"OptionalFields": {​
"Field": [​
"IsMultipartUploaded",​
"EncryptionStatus",​
"CRC64",​
"Size",​
"StorageClass",​
"LastModifiedDate",​
"ETag"​
]​
}​
}​
],​
"IsTruncated": "false"​
}​
}​
​
​
Last updated: 2026.08.03 10:37:09