Graphon API

S3 · Versioning & retention

GetObjectRetention

GET/{bucket}/{key}?retention

Returns the retention of one object version.

Shows the retention mode and the date until which storage keeps the version.

View as Markdown
Role
Viewer or higher
Support
Supported
  • Needs versionId. Returns the retention of that version.

Path parameters

bucketstringrequired

The bucket name.

keystringrequired

The object key. Keep each / as it is. Percent-encode the other reserved characters.

Query parameters

retentionflagrequired

Selects this operation. Send it with no value.

versionIdstringrequired

The version to read.

Headers

The workspace ID that must own the bucket. Another owner returns 403 AccessDenied.

Responses

200OK

The retention. The element is empty when the version has no retention.

application/xml

Retentionobjectrequired

The root element.

Modestring

Always COMPLIANCE.

The date until which storage keeps the version.

Errors

Select an error in the response example to see its XML body. Any request can also get the common errors, such as SignatureDoesNotMatch.

400InvalidRequest

The request has no versionId.

What to do: Send the versionId of the version.

404NoSuchKey

The bucket has no object at this key, or no version with this versionId.

What to do: Check the key and the versionId.

405MethodNotAllowed

The versionId names a delete marker, which has no bytes.

What to do: Use the versionId of a version that holds data. ListObjectVersions shows each one.

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?