Skip to main content

tigris objects list-versions

List object versions and delete markers in a bucket. Requires bucket versioning to be enabled. Returns versions and delete markers as two separate arrays to match the S3 ListObjectVersions response.

Alias: lv

Usage​

tigris objects list-versions <bucket> [flags]
t3 o lv <bucket> [flags]

The bucket argument also accepts a t3://bucket/prefix/ path; the prefix is applied automatically.

Flags​

NameRequiredDefaultDescription
--prefix, -pNo—Filter by key prefix
--delimiter, -dNo—Group keys sharing a common prefix up to the delimiter (e.g. / for folder-style)
--formatNotableOutput format. Options: json, table, xml
--limitNo—Maximum number of items to return per page
--key-markerNo—Pagination marker — the key to start listing from (from a prior nextKeyMarker)
--version-id-markerNo—Pagination marker — the version id to start listing from (from a prior nextVersionIdMarker)
--deletedNo—List the recoverable versions of soft-deleted objects

Examples​

# List all versions in a bucket
tigris objects list-versions my-bucket

# Scope to a path with a t3:// URI
tigris objects list-versions t3://my-bucket/logs/

# Filter by prefix
tigris objects list-versions my-bucket --prefix images/

# JSON output (suitable for jq)
tigris objects list-versions my-bucket --format json

Output shape​

The json and xml outputs always emit valid empty arrays when there are no results, so consumers don't have to special-case the empty case:

{
"versions": [
{
"name": "report.pdf",
"versionId": "abc123",
"isLatest": true,
"size": 1024,
"lastModified": "..."
}
],
"deleteMarkers": [
{
"name": "old.txt",
"versionId": "def456",
"isLatest": true,
"lastModified": "..."
}
],
"commonPrefixes": [],
"nextKeyMarker": null,
"nextVersionIdMarker": null,
"hasMore": false
}

When the result set is paginated, the table-format output prints a hint with the --key-marker and --version-id-marker values needed for the next page.

Listing soft-deleted versions​

On a bucket with soft delete enabled, --deleted lists the recoverable versions of deleted objects instead of the live version history. Unlike the default listing, this works on a bucket without versioning:

tigris objects list-versions my-bucket --prefix contracts/ --deleted

Every delete on a key produces its own recoverable version, so a key deleted more than once has one entry per delete. Each entry's lastModified is the time of the delete, not of the last write, and isLatest is always false.

The versionId from this listing is what objects restore-deleted and objects purge take:

tigris objects list-versions my-bucket --prefix report.pdf --deleted \
--format json | jq -r '.versions[] | "\(.versionId)\t\(.lastModified)"'

Deleted entries come back under versions, not deleteMarkers — Tigris returns them as object versions so they can carry a size and an ETag.