Description: This API is called to restore the archived packages. For information on how to restore archived packages via the UI, see Restore Archived Packages.
Security: Requires a platform admin. A project admin with permission can restore on the project level.
Usage: POST /artifactory/api/archive/v2/restore/packages
Produces: application/json
Sample Request:
POST https://[JFrogPlatformURL]/artifactory/api/archive/v2/restore/packages?projectKey=myProject
{
"restoreToOriginal": true,
"fallbackDestinationPath": "npm-local",
"newDestinationPath": "",
"manifestPaths": ["npm-local/npm-1.0.json"]
}
Query and Request Parameters
Field | Type | Description |
|---|---|---|
| string | This key is obtained from the Project Settings screen. This parameter is used only for project-level restore, it is not used for global-level policies. This parameter is not mandatory. It takes the default value. |
| boolean | A true value means the package will be restored to the original repository where the items were located before archiving. A false value means the package will be restored to the new destination path. This parameter is mandatory if |
| string | If Note:
|
| string | Restore the packages to the new destination path other than where the items were located before archiving. This parameter is mandatory if |
| array | A manifest file path that contains metadata or a list of items that need to be restored. |
Sample Response
200 Created
Content-Type: application/json
{
"runSummaryId": 1, // Integer
"responseMessage": "Restore process was initialized successfully." // String
}Response Error Codes
Code | Description |
|---|---|
200 | The request was successful and the response body contains the |
400 | Validation errors. |
401 | Bad Credentials. |
403 | Unauthorized. |
500 | Internal server error. |