Description: This API is called to provide details on a single release bundle cleanup policy.
Security: Requires a platform admin. A project admin with permission can call this API on the project level.
Produces: application/json
Usage: GET http://{host:port}/artifactory/api/cleanup/bundles/policies/{policyKey}
Query Parameters:
Field | Type | Description |
---|---|---|
| string | The ID that identifies the policy. This ID was configured when creating the policy. You can find the policy ID by calling Get All Release Bundle Cleanup Policies API, searching the results for the appropriate description and then its corresponding ID. |
Sample Query
GET http://{host:port}/artifactory/api/cleanup/bundles/policies/key1
Sample Response:
{ "key": "key1", "description": "some test description", "cronExp": "0 15 10 * * ? 2025", "itemType": "releaseBundle", "durationInMinutes": 150, "enabled": true, "searchCriteria": { "includeAllProjects": true, "includedProjects": [], "releaseBundles": [ { "name": "myReleaseBundle", "projectKey": "default" } ], "excludePromotedEnvironments": [ "**" ], "createdBeforeInMonths": 24 } }
The response include the following information:
Parameter | Type | Description |
---|---|---|
| String | A unique identifier for the cleanup policy (for example, "key1"). |
| String | A brief description of the cleanup policy |
| String | A cron expression specifying when the cleanup job will run (for example, |
| String | The type of items to clean up ( |
| 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 (for example, 60). |
| Boolean | Indicates if the cleanup policy is active ( A cleanup policy must be created inactive. This parameter is optional, but if used it must be set to false. If set to true when calling this API, the API call will fail and an error message is received. NoteAfter a cleanup policy is created, it can be set to active by calling Enable/Disable Release Bundle Cleanup Policy API. |
| Object | An object containing search criteria for the cleanup job. |
| Boolean | Specifies whether to include all projects in the search ( |
| Array of Strings | A list of specific project keys to include in the search (). |
| Array of Objects | An array specifying the release bundles to consider during cleanup. |
| String | The name of the release bundle. Set "**" to include all bundles. |
| String | The project identifier associated with the release bundle. This key is obtained from the Project Settings screen. This parameter is used only for project-level cleanup policies, it is not used for global-level policies. |
| Array of Strings | A list of environments to exclude from the cleanup process. To exclude all, set to |
| Integer | Specifies the time frame for filtering based on item creation date (for example, 24 months). |
Response Error Codes
Code | Description |
---|---|
400 | Validation errors. |
500 | Internal server error. |