Description: This REST API is called to manually run a release bundle cleanup policy. For information on how to manually run a cleanup policy from the UI, see Run Cleanup Policy Manually.
Security: Requires a platform admin. A project admin with permission can manually run a policy on the project level.
Produces: application/json
Usage: PUT /artifactory/api/cleanup/bundles/policies/{policyKey}/run?dryRun=<Boolean>
Query Parameters:
Field | Type | Description |
|---|---|---|
| string | ID of the policy you want to run. This ID was configured when creating the policy. |
| boolean | Optional, default is FALSE. Dry runs are used to run a policy without actual cleanup. It produces a report used to determine which packages will be removed if an actual run will be performed. |
Sample Request:
PUT https://[JFrogPlatformURL]/artifactory/api/cleanup/bundles/policies/sample-policy/runSample Response:
201 Created
Content-Type: application/json
{
"runId": 1 // Integer
}
The response includes the following information:
Property | Description |
|---|---|
| An ID that identifies the run. This ID is used by the Stop a Running Cleanup Policy API if you want to stop running a cleanup policy that was executed. |
Response Error Codes
Code | Description |
|---|---|
400 | This code indicates one of the following errors:
|
404 | The policy with the key < |