Description: Returns a list of all available archive policies.
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: GET /api/retention/archive/policies
Produces: application/json
Sample Request:
GET /api/retention/archive/policies
Sample Response: (myPolicy without cronExp, myPolicy2 with cronExp)
[ { "key": "myPolicy", "enabled": false, "description": "Demo policy - archive using search criteria form", "durationInMinutes": 0, "expirationTimeInMonths": 0, "skipTrashcan": false, "searchCriteriaForm": { "properties": { "include": { "operator": "or", "values": [ { "propertyKey": "updated", "propertyValue": "updated" } ] }, "exclude": { "operator": "or", "values": [] } }, "repositories": { "include": { "operator": "or", "values": [ "include-*", "*-repo" ] }, "exclude": { "operator": "or", "values": [] } }, "paths": { "include": { "operator": "or", "values": [] }, "exclude": { "operator": "or", "values": [ "exclude-*", "*-path" ] } }, "createdBefore": 2, "downloadedBefore": 3 }, "lastRunStatus": { "migrationIdentifier": "retention_archive_myPolicy2_OUYEVKCIO3", "state": "COMPLETE", "completedNumberOfArtifacts": 0, "failedNumberOfArtifacts": 0, "totalNumberOfArtifacts": 0, "progressPercentage": 0, "startTime": 1632915823313, "finishTime": 1632915823355, "totalByteSize": 0, "successByteSize": 0, "failureByteSize": 0, "triggeredBy": "admin", "policyName": "myPolicy" } }, { "key": "myPolicy2", "enabled": true, "description": "Demo policy - archive using search criteria form", "cronExp": "0 0 0/1 ? * * *", "durationInMinutes": 0, "expirationTimeInMonths": 0, "skipTrashcan": false, "searchCriteriaForm": { "properties": { "include": { "operator": "or", "values": [ { "propertyKey": "updated", "propertyValue": "updated" } ] }, "exclude": { "operator": "or", "values": [] } }, "repositories": { "include": { "operator": "or", "values": [ "include-*", "*-repo" ] }, "exclude": { "operator": "or", "values": [] } }, "paths": { "include": { "operator": "or", "values": [] }, "exclude": { "operator": "or", "values": [ "exclude-*", "*-path" ] } }, "createdBefore": 2, "downloadedBefore": 3 }, "lastRunStatus": { "migrationIdentifier": "retention_archive_myPolicy2_OUYEVKCIO3", "state": "COMPLETE", "completedNumberOfArtifacts": 0, "failedNumberOfArtifacts": 0, "totalNumberOfArtifacts": 0, "progressPercentage": 0, "startTime": 1632915823313, "finishTime": 1632915823355, "totalByteSize": 0, "successByteSize": 0, "failureByteSize": 0, "triggeredBy": "admin", "policyName": "myPolicy2" }, "nextExecutionTime": 1632916800000 } ]
The response displays the following information:
Property | Description |
---|---|
| Unique policy key that identifies the policy. |
| If the policy is enabled/disabled for execution. |
| Description for the policy. |
| The ???query used to search for the artifacts to be archived. |
| The Cron expression is used for scheduling the archive policy. |
| Time when the policy is scheduled to run next. This depends on the cronExp and the previous execution time. |
| The maximum duration (in minutes) for policy execution. |
| Shows the status of the last policy run. It can be one of the following:
|
| Total number of artifacts to be archived. |
| Total number of artifacts that were successfully archived. |
| Total number of artifacts that could not be archived. |
| The progress of the archive policy (in percentage). |
| Time when the policy started executing. Value is in Unix epoch time in milliseconds. |
| Time when the policy finished executing. Value is in Unix epoch time in milliseconds. |
| The total size of the artifacts included in the policy. |
| The size of the artifacts that were archived. |
| The size of the artifacts that couldn't be archived. |
| The expiration period (in months) that it takes for archived artifacts to be cleaned up from the Cold instance. |
| If the transfer of the artifacts to the Trash Can repository is enabled or disabled. |
Status:
200: Success