S3 · Versioning & retention
ListObjectVersions
/{bucket}?versionsLists the versions and delete markers in a bucket.
Returns the versions and delete markers in key order, then in version ID order. Version IDs are random, so the order within a key is not by time. Use IsLatest and LastModified to find the newest version.
- Role
- Viewer or higher
- Support
- Supported
- Lists live versions and delete markers, with key and version markers.
- Storage ignores
delimiter. The response has no CommonPrefixes.
Path parameters
The bucket name.
Query parameters
Selects this operation. Send it with no value.
Return only keys that start with this value.
The NextKeyMarker of the previous page.
The NextVersionIdMarker of the previous page.
The most keys to return. Storage clamps the value to 1 through 1,000.
Default: 1000
Headers
The workspace ID that must own the bucket. Another owner returns 403 AccessDenied.
Responses
200OK
One page of versions.
application/xml
The root element.
NamestringThe bucket name.
PrefixstringThe prefix of the request.
MaxKeysintegerAlways 1000, whatever the request sent.
IsTruncatedbooleantrue when more versions follow.
NextKeyMarkerstringPresent when IsTruncated is true. Send it as key-marker.
NextVersionIdMarkerstringPresent when IsTruncated is true. Send it as version-id-marker.
VersionarrayOne element for each version that holds data.
DeleteMarkerarrayOne element for each delete marker.
Errors
Select an error in the response example to see its XML body. Any request can also get the common errors, such as SignatureDoesNotMatch.
- 404NoSuchBucket
No bucket has this name, or the bucket was deleted.
What to do: Check the bucket name. ListBuckets shows the buckets of the workspace.
- 403AccessDenied
The key does not have the role for this operation, or the bucket is in another workspace.
What to do: Use a key of the workspace that owns the bucket, with the role above.