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.

> 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

<
<