Object Retention
last updated: 2024-05-19
The DTZ objectstore supports object level expiration/retention. By default an object is kept forever. If an expiration is set, the object will no longer be visible after the expiration.
The object will evnetually be cleaned up and diappear from the used storage. Retention jobs should perform cleanup daily, but are running lazily.
Setting Retention
Retention can be set with an extra header while uploading the object.
- HTTP Header: X-DTZ-EXPIRATION
- Header Value: iso 8601 durations
- https://en.wikipedia.org/wiki/ISO_8601#Durations
- for one day: P1D
- for one hour: PT1H
- for one day and one hour: P1T1H
> POST /api/2022-11-28/obj/object1
> Host: dtz-objectstore.dtz.rocks
> Content-Type: application/octet-stream
> X-DTZ-EXPIRATION: P1D
The expiration timestamp is then calculated on creation.
Getting Retention
If a retention is set for an object, the expiration header is always returned with the exact timestamp (rfc3339).
> GET /api/2022-11-28/obj/object1
> Host: dtz-objectstore.dtz.rocks
<
<