Skip to content
Get started

Restore Multiple

assets.restore_multiple(AssetRestoreMultipleParams**kwargs) -> AssetRestoreMultipleResponse
POST/assets/restore

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

ParametersExpand Collapse
asset_ids: Sequence[str]

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

project_id: Optional[str]

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

ReturnsExpand Collapse
class AssetRestoreMultipleResponse: …
restored_asset_ids: List[str]

The ids of the restored assets

skipped_assets: List[SkippedAsset]

The assets that were not restored, and why

asset_id: str
reason: Literal["not-found", "not-deleted", "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

import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
response = client.assets.restore_multiple(
    asset_ids=["string"],
)
print(response.restored_asset_ids)
{
  "restoredAssetIds": [
    "string"
  ],
  "skippedAssets": [
    {
      "assetId": "assetId",
      "reason": "not-found"
    }
  ]
}
Returns Examples
{
  "restoredAssetIds": [
    "string"
  ],
  "skippedAssets": [
    {
      "assetId": "assetId",
      "reason": "not-found"
    }
  ]
}