Description: This REST API is called to display smart archiving policies in the user interface and uses various optional filters to refine results.
Produces: application/json
Usage: GET /artifactory/api/archive/v2/policies/view?itemTypes=<package>&policyName=<policyKey>
Since: ???
Query Parameters:
Field | Description |
---|---|
| List of item types to filter. Possible value: package |
| Optional parameter. Partial or complete string to use for search. |
Sample Usage:
GET /artifactory/api/archive/v2/policies/view?itemTypes=<package>&policyName=<policyKey>
Sample Responses:
200 Created Content-Type: application/json { "policies": [ { "itemType": "<itemType>", // string "policyName": "<policyName>", // string "enabled": "<enabled>", // boolean "nextRunTime": "<timestamp>", // integer, milliseconds "lastRunData": { "status": "<status>", // string "lastRunTime": "<timestamp>", // integer, milliseconds "dryRun": "<dryRun>" // boolean } }, { "itemType": "<itemType>", // string "policyName": "<policyName>", // string "enabled": "<enabled>", // boolean "nextRunTime": "<timestamp>", // integer, milliseconds "lastRunData": { "status": "<status>", // string "lastRunTime": "<timestamp>", // integer, milliseconds "dryRun": "<dryRun>" // boolean } } ], }
The response includes the following information:
Property | Description |
---|---|
| The type of policy. Will be one of the following: package, artifact, build, releaseBundle. |
| The key of the policy. This ID was configured when creating the policy. |
| Whether or not the policy is enabled. A TRUE value means the policy can be executed. A FALSE value means that it cannot. |
| The next time this policy will be run. No data is available for policies that don't have a Crontime configured or that are disabled. |
| Contains the following information:
|
Response Error Codes
Code | Description |
---|---|
400 | Validation errors. |
401 | Bad Credentials. |
403 | Unauthorized. |
500 | Internal server error. |