Description: Returns a list of all existing Release Bundle v2 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:
[
{
"key": "release_test_2",
"description": "",
"cronExp": "",
"itemType": "releaseBundle",
"durationInMinutes": 0,
"enabled": false,
"searchCriteria": {
"includeAllProjects": true,
"includedProjects": [],
"releaseBundles": [
{
"name": "**",
"projectKey": ""
}
],
"excludePromotedEnvironments": [
"PROD"
],
"createdBeforeInMonths": 25,
"createdBeforeInDays": 730
}
},
{
"key": "release_test_3",
"description": "",
"cronExp": "",
"itemType": "releaseBundle",
"durationInMinutes": 0,
"enabled": false,
"searchCriteria": {
"includeAllProjects": true,
"includedProjects": [],
"releaseBundles": [
{
"name": "**",
"projectKey": ""
}
],
"excludePromotedEnvironments": [
"PROD"
],
"createdBeforeInMonths": 25,
"createdBeforeInDays": 730
}
},
{
"key": "release_test_4",
"description": "",
"cronExp": "",
"itemType": "releaseBundle",
"durationInMinutes": 0,
"enabled": false,
"searchCriteria": {
"includeAllProjects": false,
"includedProjects": [
"default"
],
"releaseBundles": [
{
"name": "**",
"projectKey": ""
}
],
"excludePromotedEnvironments": [
"DEV"
],
"createdBeforeInMonths": 25,
"createdBeforeInDays": 730
}
},
{
"key": "release_test_1",
"description": "",
"cronExp": "",
"itemType": "releaseBundle",
"durationInMinutes": 0,
"enabled": false,
"searchCriteria": {
"includeAllProjects": true,
"includedProjects": [],
"releaseBundles": [
{
"name": "**",
"projectKey": ""
}
],
"excludePromotedEnvironments": [
"DEV"
],
"createdBeforeInMonths": 25,
"createdBeforeInDays": 730
}
}
]The response includes the following information:
Property | Type | Description |
|---|---|---|
| striing | The ID that identifies the policy. This ID was configured for the policy when it was created. |
| string | Description that was defined for the policy. |
| string | The cron expression that determines when the policy is run. |
| string | The policy type ( |
| integer | The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed. While setting a maximum run duration for a policy is useful for adhering to a strict cleanup schedule, it can cause the policy to stop before completion. |
| boolean | A |
| array:objects | The criteria that define aspects of the policy such as package types (docker, maven), names of repositories in which the policy will run, and other relevant criteria. |
| boolean | If Note: This parameter is relevant only on the global level for Platform Admins. |
| array;string | The name(s) of the project(s) on which the policy will run. Note: This parameter is relevant only on the global level for Platform Admins. |
| array:object | The array of Release Bundles included in the cleanup. |
| array:string | The Release Bundle names. Set to ** to include all bundles. |
| array:string | The project identifier associated with the Release Bundle, if any. This key is obtained from the Project Settings screen. |
| array:string | A list of stages to exclude from the cleanup process. To exclude all, set to **. |
| integer | The time frame for filtering based on item creation dates in months. For example, if this field is Note: This property is relevant for policies created before version 7.119.0. |
| integer | The time frame for filtering based on item creation dates in days. Note: This property is relevant for policies created after version 7.119.0. |
Response Error Codes:
Code | Description |
|---|---|
400 | Validation errors. |
500 | Internal server error. |