Inventory Configuration Management

Prev Next

Wasabi’s S3-compatible Inventory generates scheduled per-bucket object listings (with selected metadata). Manage it using standard S3 Inventory APIs to set the frequency (daily/weekly), scope/prefix, versions (current/all), and which fields to include (such as size, ETag, encryption status, tags). Reports are written to a destination bucket of your choice. Inventory is fully S3-API compatible and uses existing AWS S3 SDKs/CLI with Wasabi endpoints. This article explains required permissions and provides sample requests.

Creating a Single-Source, Single-Destination Inventory (No Filter, No ETag)

This sample request shows how to configure an inventory that exports all objects from one source bucket to a single destination bucket, with no filter applied and the ETag field excluded.

PUT https://s3.<region>. wasabisys.com/<source-bucket-name>?inventory&id=<report name>

Request Body

<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Id><report name></Id>
    <IsEnabled>true</IsEnabled>  
    <Filter><Prefix> </Prefix></Filter>        
    <Destination>
        <S3BucketDestination>
            <Format>CSV</Format>
            <Bucket>arn:aws:s3:::<destination-bucket-name></Bucket>
        </S3BucketDestination>
    </Destination>
    <Schedule><Frequency>Daily</Frequency></Schedule>
    <IncludedObjectVersions>Current</IncludedObjectVersions>        
</InventoryConfiguration>

Status: 204 No Content

Creating a Single-Source, Single-Destination Inventory (With Filter and ETag)

This sample request shows how to configure an inventory that exports all objects from one source bucket to a single destination bucket, with a filter and ETag field applied.

PUT https://s3.<region>. wasabisys.com/<source-bucket-name>?inventory&id=<report name>

Request Body

<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Id><report name></Id>
    <IsEnabled>true</IsEnabled>  
    <Filter><Prefix>testing</Prefix></Filter>        
    <Destination>
        <S3BucketDestination>
            <Format>CSV</Format>
            <Bucket>arn:aws:s3:::<destination-bucket-name></Bucket>
        </S3BucketDestination>
    </Destination>
    <Schedule><Frequency>Daily</Frequency></Schedule>
    <IncludedObjectVersions>Current</IncludedObjectVersions>
<OptionalFields><Field>ETag</Field></Option        
</InventoryConfiguration>

Status: 404 No Content

Creating an Inventory Configuration With a Prefix and Optional Fields

If you create an inventory with a Prefix under <S3BucketDestination>, the inventory file must exist in the following path:

<Name of The prefix> / <Destination Bucket> / <Name of the Inventory> / < Time stamp> / <Inventory file.csv>

In addition, these optional fields are supported:

      ETag
      Size
      LastModifiedDate
      ReplicationStatus
      IsMultipartUploaded
      EncryptionStatus
      StorageClass
      ChecksumAlgorithm
      ObjectAccessControlList
      ObjectOwner
      ObjectLockRetainUntilDate  
      ObjectLockMode
      ObjectLockLegalHoldStatus

In the following example, Previx and optional fields are added under <S3BucketDestination> to create a new inventory configuration.

PUT https://s3.<region>.wasabisys.com/<source-bucket-name?inventory&id=<report name> 

Request Body

<InventoryConfiguration>
    <Destination>
        <S3BucketDestination>
            <Bucket>arn:aws:s3:::objectlocktest</Bucket>
            <Format>CSV</Format>
            <Prefix>jawakhar</Prefix>
        </S3BucketDestination>
    </Destination>
    <Id>jawakhar-march0401</Id>
    <IncludedObjectVersions>All</IncludedObjectVersions>
    <IsEnabled>true</IsEnabled>
    <Schedule>
        <Frequency>Daily</Frequency>
    </Schedule>
    <OptionalFields>
      <Field>Size</Field>
      <Field>LastModifiedDate</Field>
      <Field>ReplicationStatus</Field>
      <Field>IsMultipartUploaded</Field>
      <Field>EncryptionStatus</Field>
      <Field>StorageClass</Field>
      <Field>ETag</Field>
      <Field>ChecksumAlgorithm</Field>
      <Field>ObjectAccessControlList</Field>
      <Field>ObjectOwner</Field>
      <Field>ObjectLockRetainUntilDate</Field> 
      <Field>ObjectLockMode</Field>
      <Field>ObjectLockLegalHoldStatus</Field>
    </OptionalFields>
</InventoryConfiguration>

Response: 204 No Content

Updating an Existing Inventory Configuration

This sample request shows how to update the inventory configuration for a specified source bucket in a specified region.

PUT https://s3.<region>. Wasabisys.com/source-bkt-1?inventory&id=inventory-report-1

Request Body

<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Id>inventory-report-1 </Id>
    <IsEnabled>true</IsEnabled>  
    <Filter><Prefix>Folder</Prefix></Filter>        
    <Destination>
        <S3BucketDestination>
            <Format>CSV</Format>
            <Bucket>arn:aws:s3:::destination-bkt-1</Bucket>
        </S3BucketDestination>
    </Destination>
    <Schedule><Frequency>Daily</Frequency></Schedule>
    <IncludedObjectVersions>Current</IncludedObjectVersions>        
</InventoryConfiguration>

Status:204 No Content

Retrieving an Inventory Configuration

This sample request shows how to fetch the inventory configuration (by report ID) for the specified source bucket in a specified region.

GET https://s3.<region>. wasabisys.com/<source-bucket-name>?inventory&id=<report name>

Status: 200 OK

Deleting an Inventory Configuration

This sample request shows how to delete the specified inventory configuration (by report ID) from the source bucket in a specified region.

DELETE  https://s3.<region>. wasabisys.com/<source-bucket-name>?inventory&id=<report name>

Status: 200 OK