Update Download Rule
Update a download rule by ID.
Allowed Roles: Workspace Admin or System Admin • Authentication Required • Local or remote repositories only
Notes: Requires the Download Rules feature (Pro self-hosted plan or higher); otherwise this endpoint returns 403. This endpoint supports partial updates. Omitted fields keep their current values. Remote repositories cannot use hide mode with CVE scan fields; use block for those rules.
PATCH https://api.repoflow.io/1/workspaces/<workspace-ref>/repositories/<repository-ref>/download-rules/<download-rule-id>
Path Parameters
Workspace ID or name.
Repository ID or name.
Download rule ID (UUID).
Body
Download rule name. If omitted, the current name is kept.
Optional description.
Whether the rule should be active. If omitted, the current enabled state is kept.
Rule target. If omitted, the existing target type is kept.
Rule action. If omitted, the current mode is kept. hide is rejected for remote repositories when ruleJson uses CVE scan fields.
Rule conditions. If omitted, the current rule JSON is kept.
Rule-level behavior for rules that use CVE scan fields. If omitted, the current value is kept.
Rule-level maximum accepted CVE scan age in hours. Use null to never expire existing scans for this rule. If omitted, the current value is kept.