Description: Provides an estimated count and total size of archive candidates based on the provided retention policy model.
Note
This Cold Storage feature is available only for Artifactory Enterprise and Enterprise+ users.
Since: Artifactory 7.27.3
Security: Requires an admin user
Usage: POST /artifactory/api/retention/archive/policies/preview
Produces: application/json
Consumes: text/plain
Sample Request:
POST https://[JFrogPlatformURL]/artifactory/api/retention/archive/policies/previewSample Request:
{
"key": "dfsdf",
"aqlQuery": "",
"description": "",
"cronExp": "",
"enabled": true,
"expirationTimeInMonths": 0,
"durationInMinutes": 0,
"nextExecutionTime": null,
"skipTrashcan": false,
"packageRetention": true,
"packageSearchCriteriaForm": {
"packageType": "generic",
"packageRepos": [
"example-repo-local"
],
"componentName": "",
"version": ""
}
}Request Parameters:
Parameters | Type | Description | Required/Optional |
|---|---|---|---|
| boolean | Determines whether the archive policy works on packages ( The default value is | Required |
| string | Unique policy key that identifies the policy. | Required |
| boolean | Enable/disable policy. If disabled, policy execution is blocked. | Optional |
| string | The Cron expression for scheduling the policy. | Optional |
| string | Search for artifacts to be archived using Artifactory Query Language (AQL). This can be used instead of The AQL query can be to:
NoteYou may run AQL queries only on the Item domain. Other primary domains, such as Build, Entry, Promotion, and Release are not supported. | Required if Note
|
| object | This can be used instead of | Required if |
| string | The type of package | Required |
| string | A list of repositories to which the policy applies | Required |
| string | Description for the policy. | Optional |
| long | The maximum duration (in minutes) for policy execution. If policy execution exceeds this period, it is stopped. | Optional |
| long | The expiration period (in months) that it takes for archived artifacts to be cleaned up from the Cold instance. | Optional |
| boolean | Prevent the transfer of the artifacts to the trash can repository, and allow the artifacts to be deleted by a full GC cleanup. Default value is | Optional |
Sample Response:
{
"count" : 10, //archive candidates count
"totalSize" : 80 //total size in bytes
}
Status:
200: Success