Skip to content
Get started

Restore Multiple

POST/assets/restore

Restore assets deleted in the last 30 days. Tags and collections are not restored. Max plan and above only.

Query ParametersExpand Collapse
projectId: optional string

The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

Body ParametersJSONExpand Collapse
assetIds: array of string

The ids of the deleted assets to restore. (Max 100 at once)

ReturnsExpand Collapse
restoredAssetIds: array of string

The ids of the restored assets

skippedAssets: array of object { assetId, reason }

The assets that were not restored, and why

assetId: string
reason: "not-found" or "not-deleted" or "expired"

“not-found”: no asset with this id. “not-deleted”: the asset is not deleted. “expired”: deleted more than 30 days ago, or past the Free plan retention period.

One of the following:
"not-found"
"not-deleted"
"expired"

Restore Multiple

curl https://api.cloud.scenario.com/v1/assets/restore \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{
          "assetIds": [
            "string"
          ]
        }'
{
  "restoredAssetIds": [
    "string"
  ],
  "skippedAssets": [
    {
      "assetId": "assetId",
      "reason": "not-found"
    }
  ]
}
Returns Examples
{
  "restoredAssetIds": [
    "string"
  ],
  "skippedAssets": [
    {
      "assetId": "assetId",
      "reason": "not-found"
    }
  ]
}