Description: Triggers restoration of multiple items from the Archive. An admin can choose one of the following options:
Restore items to the original location and provide fallback repository in case the original location was deprecated.
Restore to a dedicated central repository.
Important
Restore operation only moves the items back to the Warm instance location and does not delete them from the Cold instance.
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 /api/retention/restore
Consumes: application/json
Query Parameters:
Parameters | Type | Description | Required/Optional |
---|---|---|---|
| string | Determines whether to restore a package ( The default value is | Required |
| boolean | Set whether or not to restore to the original artifact location (saved on the Cold instance). | Required if |
| string | If NoteBefore providing the | Required if |
| string | The repository key where the files need to be restored. The files will be restored to this repository according to its original path hierarchy. For example, if the repository key is
NoteBefore providing the | Required if |
| boolean | This is set as When set as | Optional |
| string | Comma-separated list of the items or paths to be restored. Format: NoteFolder paths must end with a NoteSince Example: Where:
For information about getting the namespace, see Get Namespace. | Required |
Sample Request:
POST /api/retention/restore
Restoring artifacts:
{ "restoreType": "ARTIFACT_RESTORE", "restoreToOriginal": "false", "fallbackDestinationPath":"", "centralDestinationPath": "3750-artifacts", "itemsToRestore": [] }
Restoring packages:
{ "restoreType": "PACKAGE_RESTORE", "restoreToOriginal": "false", "fallbackDestinationPath":"", "centralDestinationPath": "nir", "itemsToRestore": [ "docker-local/docker-alpine-tag-11003.json", "docker-local/docker-alpine-tag-11004.json", "docker-local/docker-alpine-tag-11005.json", "docker-local/docker-alpine-tag-11012.json", "docker-local/docker-alpine-tag-11014.json", "docker-local/docker-alpine-tag-11017.json", "docker-local/docker-alpine-tag-11026.json", "docker-local/docker-alpine-tag-11034.json", "docker-local/docker-alpine-tag-11038.json", "docker-local/docker-alpine-tag-11045.json", "docker-local/docker-alpine-tag-11999.json" ] }
Sample Response (packages): Successful
{
"response" : "Restore process was initialized successfully.",
"restore_operation_id" : "retention_restore_package_AL8VPOK4EW"
}
Sample Response (artifacts): Successful
{
"response" : "Restore process was initialized successfully.",
"restore_operation_id" : "retention_restore_artifact_FVRU5YWVRU"
}
Note
Archive restore operations can be tracked using the Get Restore Process Status API. An error message is displayed in Artifactory if the restore operation fails.
Status:
200: Success