Graphon API

S3 · Versioning & retention

ListObjectVersions

GET/{bucket}?versions

Lists 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.

View as Markdown
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

bucketstringrequired

The bucket name.

Query parameters

versionsflagrequired

Selects this operation. Send it with no value.

prefixstringoptional

Return only keys that start with this value.

key-markerstringoptional

The NextKeyMarker of the previous page.

version-id-markerstringoptional

The NextVersionIdMarker of the previous page.

max-keysintegeroptional

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

ListVersionsResultobjectrequired

The root element.

Namestring

The bucket name.

Prefixstring

The prefix of the request.

MaxKeysinteger

Always 1000, whatever the request sent.

true when more versions follow.

Present when IsTruncated is true. Send it as key-marker.

Present when IsTruncated is true. Send it as version-id-marker.

Versionarray

One element for each version that holds data.

One 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.

Was this page helpful?