Skip to main content

Update Retention Rule

Update a retention rule by ID.

Allowed Roles: Workspace Admin or System Admin • Authentication Required • Local repositories only

Notes: If retention rules are disabled on the server, this endpoint returns 403.

PATCH https://api.repoflow.io/1/workspaces/<workspace-ref>/repositories/<repository-ref>/retention-rules/<retention-rule-id>

Path Parameters

workspace-refstringRequired

Workspace ID or name.

repository-refstringRequired

Repository ID or name.

retention-rule-idstringRequired

Retention rule ID (UUID).

Body Parameters

namestringOptional

Retention rule name.

descriptionstringOptional

Retention rule description.

ruleJsonobjectOptional

Retention rule JSON (conditions + keepRules).

cronstring | nullOptional

Cron expression for scheduling. Provide null to remove the schedule.

isRuleEnabledbooleanOptional

Whether the retention rule is enabled. If set to true, cron must be set (either in the request, or already on the rule).