Description: This REST API is called to enable or disable a cleanup policy. A policy must be enabled for it to run according to the automated schedule set in the cron expression or to trigger a run manually.
Note
A dry run can be performed on a policy that is disabled.
Security: Requires a platform admin. A project admin with permission can enable or disable a policy on the project level.
Usage: POST /artifactory/api/cleanup/bundles/policies/{policyKey}/enablement
Produces: application/json
Sample Query:
POST https://[JFrogPlatformURL]/artifactory/api/cleanup/bundles/policies/key1/enablement
{
"enabled": true
}Query Parameters:
Field | Type | Description |
|---|---|---|
| string | The ID that identifies the policy. This ID was configured when creating the policy. |
enabled | boolean | A true value means the policy can be executed. A false value means that it cannot. |
Response Error Codes
Code | Description |
|---|---|
400 | Validation errors. |
404 | A policy with the specified key does not exist. |
500 | Internal server error. |