Restores previously archived packages back to active state

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Moves one or more archived packages back to live (active) state so they can be used again in deployments and SSP publishing.

Request URL

https://{server-hostname}:8383/dcapi/swDeployment/package/restoreArchivedPackages

Scope

SWDeployment.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/PackageRestoreStatus.v1+jsonapplication/PackageRestoreStatus.v1+jsonCopied!
AcceptstringMandatory
application/PackageRestoreStatus.v1+jsonapplication/PackageRestoreStatus.v1+jsonCopied!

- Request Body

application/json
JSON Object
Hide Sub-Attributes
packageIdsarrayOptional

Array of package ID longs to restore. Obtain package IDs from the packageId field in the response of the List Packages API.

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/dcapi/swDeployment/package/restoreArchivedPackages \
  --header 'Accept: application/PackageRestoreStatus.v1+json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/PackageRestoreStatus.v1+json' \
  --data '{"packageIds":[10001]}'

Sample Request Body

Restore one package

Copied!
  {
    "packageIds": [
      10001
    ]
  }
                
Show full

Restore multiple packages

Copied!
  {
    "packageIds": [
      10001,
      10002
    ]
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
statusstring

Operation result message

- HTTP code 500

Response Body - application/json
JSON Object
Hide Sub-Attributes
errorCodestring

SW_INTERNAL_ERROR for cleanup settings failures, INTERNAL_ERROR for restore operation errors

errorMessagestring

Internal server error with details about the cleanup policy or archive restore failure

Possible Response Codes

200HTTP code
500HTTP code

Sample Response: HTTP 200

Packages restored

Copied!
  {
    "status": "success"
  }
                
Show full

Sample Response: HTTP 500

Server error

Copied!
  {
    "errorMessage": "Internal Server Error",
    "errorCode": "INTERNAL_ERROR"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.