Inventory API Reference

This page documents the RESTful API endpoints for managing bucket inventory configurations. All inventory operations are scoped to a bucket and use the ?minio-inventory query parameter.

For CLI-based management, see mc inventory. For configuration details, see the Configuration Reference.

Permissions

Inventory API endpoints require the following IAM permissions:

PermissionOperations
s3:GetInventoryConfigurationRetrieve configurations and job statuses
s3:PutInventoryConfigurationCreate, update, and delete configurations
s3:ListBucketRequired on the source bucket for jobs to run
admin:InventoryControlCancel, suspend, and resume jobs (admin only)

Generate configuration template

Generate a YAML template for a new inventory configuration.

Request:

GET /{bucket}?minio-inventory&generate&id={id}
ParameterTypeRequiredDescription
bucketstringyesSource bucket name
idstringyesID for the new inventory configuration

Response: 200 OK with Content-Type: application/x-yaml

Create or update a configuration

Create a new inventory configuration or update an existing one. Provide the configuration in the request body as a YAML document.

Request:

PUT /{bucket}?minio-inventory&id={id}
ParameterTypeRequiredDescription
bucketstringyesSource bucket name
idstringyesInventory configuration ID

Request body: Complete inventory configuration in YAML format. See the Configuration Reference for the YAML schema.

Response: 200 OK

Get a configuration

Retrieve a specific inventory configuration.

Request:

GET /{bucket}?minio-inventory&id={id}

Response: 200 OK with Content-Type: application/json

{
  "bucket": "my-bucket",
  "id": "daily-report",
  "user": "admin",
  "yamlDef": "..."
}

Delete a configuration

Delete an inventory configuration from a bucket.

Request:

DELETE /{bucket}?minio-inventory&id={id}

Response: 200 OK

List configurations

List all inventory configurations for a bucket. Results are paginated.

Request:

GET /{bucket}?minio-inventory&continuation-token={token}

For the first request, provide an empty token: &continuation-token=

Response: 200 OK with Content-Type: application/json

{
  "items": [
    {
      "bucket": "my-bucket",
      "id": "daily-report",
      "user": "admin"
    }
  ],
  "nextContinuationToken": "..."
}

Use the nextContinuationToken value to retrieve subsequent pages.

Get job status

Retrieve the status of a specific inventory job.

Request:

GET /{bucket}?minio-inventory&id={id}&status

Response: 200 OK with Content-Type: application/json

{
  "bucket": "my-bucket",
  "id": "daily-report",
  "user": "admin",
  "schedule": "daily",
  "state": "completed",
  "startTime": "2025-10-11T10:30:00Z",
  "endTime": "2025-10-11T10:45:00Z",
  "scanned": "my-bucket/path/to/last/scanned/object",
  "matched": "my-bucket/path/to/last/matched/object",
  "scannedCount": 15234,
  "matchedCount": 8421,
  "recordsWritten": 8421,
  "outputFilesCount": 3,
  "executionTime": "15m0s",
  "manifestPath": "dest-bucket/prefix/source-bucket/daily-report/2025-10-11T10-30Z/manifest.json"
}

Status fields

FieldTypeDescription
bucketstringSource bucket name
idstringInventory configuration ID
userstringUser who created the job
accessKeystringAccess key used for job execution
schedulestringJob schedule: once, hourly, daily, weekly, monthly, yearly
statestringCurrent state: sleeping, pending, running, completed, failed, errored, suspended, canceled
nextScheduledTimetimestampNext execution time (periodic jobs in sleeping state only)
startTimetimestampWhen the current or last execution started
endTimetimestampWhen the execution completed
scannedCountuint64Total objects scanned
scannedstringLast scanned object path
matchedstringLast matched object path
matchedCountuint64Objects matching the configured filters
recordsWrittenuint64Metadata records written to output files
outputFilesCountuint64Number of output data files created
executionTimestringTotal execution time (for example, 15m0s, 2h30m)
numStartsuint64Number of times the job has started
numErrorsuint64Total errors encountered
numLockLossesuint64Times the job lost its distributed lock
manifestPathstringPath to the manifest.json file (present after first output file)
retryAttemptsuint64Retry attempts for failed jobs
lastFailTimetimestampWhen the last failure occurred (present on errors only)
lastFailErrorsstring[]Up to 5 most recent error messages (present on errors only)

Timestamps use RFC 3339 format.

Admin control operations

These operations require admin:InventoryControl permission.

Cancel a job

Cancels a running inventory job. For periodic jobs, this stops only the current execution. For once jobs, cancellation is terminal.

POST /minio/admin/v3/inventory/{bucket}/{id}/cancel

Responses: 200 OK, 409 Conflict (already canceled), 404 Not Found, 403 Forbidden

Suspend a job

Suspends a job and prevents all future scheduled runs until resumed.

POST /minio/admin/v3/inventory/{bucket}/{id}/suspend

Responses: 200 OK, 409 Conflict (already suspended or completed), 404 Not Found, 403 Forbidden

Resume a job

Resumes a suspended job and re-enables scheduling.

POST /minio/admin/v3/inventory/{bucket}/{id}/resume

Responses: 200 OK, 409 Conflict (not suspended), 404 Not Found, 403 Forbidden

On this page