Description: This API is called to return a list of all the existing release bundle cleanup policies for either a specific project or for the entire system.
Security: Requires a platform admin. A project admin with permission can call this API on the project level.
Usage: GET /artifactory/api/cleanup/bundles/policies/
Produces: application/json
Sample Request
GET https://[JFrogPlatformURL]/artifactory/api/cleanup/bundles/policies/?projectKey=myProjectQuery Parameters:
Field | Type | Description |
|---|---|---|
| string | This parameter is used when calling this API to return all cleanup policies for a specific project. This parameter identifies the project of the policies you want to receive. This parameter is optional for a platform admin, but not using it will return all cleanup policies in Artifactory, both global policies and project-level policies. This parameter is mandatory for a project admin. |
Sample Response:
{
"policies" : [ {
"itemType" : "releaseBundle",
"policyKey" : "key2",
"nextRunTime" : 1736849700000,
"enabled" : false,
"displayProject" : "Global",
"includedProjects" : [ "All" ]
}, {
"itemType" : "releaseBundle",
"policyKey" : "test",
"enabled" : true,
"displayProject" : "Global",
"lastRunData" : {
"status" : "COMPLETED",
"lastRunTime" : 1736760175046,
"dryRun" : false,
"runId" : 2,
"reportDownloaded" : true,
"totalItems" : 0
},
"includedProjects" : [ "Unassigned Repos" ]
}, {
"itemType" : "releaseBundle",
"policyKey" : "key1",
"nextRunTime" : 1736849700000,
"enabled" : true,
"displayProject" : "Global",
"includedProjects" : [ "All" ]
} ]
}The response includes the following information:
Property | Type | Description |
|---|---|---|
| Array of Objects | An array containing multiple policy objects, each representing a cleanup policy. |
| String | The type of item the policy applies to releaseBundle. |
| String | A unique identifier for the policy (for example, "key2", "test", "key1"). |
| Long (Timestamp) | The timestamp (in milliseconds since epoch) represents the next scheduled execution time for the policy. |
| Boolean | Indicates whether the policy is currently active (true) or disabled (false). |
| String | The project name displayed to users; typically indicates the scope (for example, "Global"). |
| Array of Strings | A list of project keys included in the policy (for example, ["All"], ["Unassigned Repos"]). |
| Object | An object representing the last execution details for the policy (available only for policies that have been run). |
| String | The status of the last run (for example, "COMPLETED", "FAILED"). |
| Long (Timestamp) | The timestamp (milliseconds since epoch) represents the last run. |
| Boolean | Indicates whether the last execution was a dry run (true) or an actual execution (false). |
| Integer | A unique identifier for the last run instance, useful for tracking and logging purposes. |
| Boolean | Indicates if the report of the last run was downloaded (true) or not (false). |
| Integer | The total number of items processed during the last run. |
Response Error Codes
Code | Description |
|---|---|
400 | Validation errors. |
500 | Internal server error. |