v1

latestOpenAPI 3.0.3AGPL-3.0-or-later2026-07-173223.8 KB
api

Create a retention rule

This endpoint requires admin access

post/ocs/v2.php/apps/files_retention/api/v1/retentions

Headers

OCS-APIRequestboolean required

Required to be true for the API request to pass

Request body

tagidinteger required

Tag the retention is based on

timeunit0 | 1 | 2 | 3 required

Time unit of the retention (days, weeks, months, years)

timeamountinteger required

Amount of time units that have to be passed

timeafter0 | 1

Whether retention time is based creation time (0) or modification time (1)

Response

Retention rule created