> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListRestorations

# Package: operations

# Namespace: BackupService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/operations/backups/list-restorations.md

## Permission Scopes:
Manage Data Backups: SCOPE.DC-DATA.MANAGE-BACKUPS

## Introduction

Retrieves a list of all data restorations from backups.

Results are sorted by requested date, with the newest first.

You can use this method to check whether a restoration initiated with Restore Backup has been completed successfully.

---

## REST API

### Schema

```
 Method: listRestorations
 Description: Retrieves a list of all data restorations from backups.  Results are sorted by requested date, with the newest first.  You can use this method to check whether a restoration initiated with Restore Backup has been completed successfully.
 URL: https://www.wixapis.com/wix-data/v2/backups/restorations
 Method: GET
 Method parameters:
   param name: paging | type: Paging    
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, format int32
        - name: offset | type: integer | description: Number of items to skip in the current sort order.  | validation: minimum 0, format int32
   query param name: status | type: array<status> | description: Statuses to filter by. If provided, only restorations with the specified statuses are listed. For example, to list only completed restorations, use `?status=COMPLETED`. To list completed and pending restorations, use `?status=COMPLETED&status=PENDING`.  Default: No filtering  | validation: maxItems 10
                 - enum:
                 -     PENDING: Restoration from a backup is in progress.
                 -     COMPLETED: Restoration from a backup has been successful.
                 -     FAILED: Restoration from a backup has failed.
 Return type: ListRestorationsResponse
  - name: restorations | type: array<Restoration> | description: Retrieved restorations.  | validation: maxItems 1000
     - name: id | type: string | description: Restoration GUID.  | read-only: true | validation: format GUID
     - name: backup | type: Backup | description: Details of the backup used for the restoration.  | read-only: true 
        - name: id | type: string | description: Backup GUID.  | read-only: true | validation: format GUID
        - name: status | type: Status | description: Backup status.  | read-only: true 
             - enum:
             -     PENDING: Backup creation is in progress.
             -     READY: Backup has been created successfully and can be used for data restoration.
             -     FAILED: Backup creation has failed.
             -     DELETED: Backup has been deleted.
             -     CANCELED: Backup has been canceled.
        - name: type | type: Type | description: Type of backup, based on how it was triggered.  | read-only: true 
             - enum:
             -     ON_DEMAND: Backup taken on demand.
             -     AUTO: Backup taken automatically by the system on a regular schedule.
        - name: requestedDate | type: string | description: Date and time the backup was requested.  | read-only: true | validation: format date-time
        - name: startedDate | type: string | description: Date and time the backup commenced. Value is `null` until the backup process begins in the background.  | read-only: true | validation: format date-time
        - name: finishedDate | type: string | description: Date and time the backup process finished. Value is `null` until the backup process is completed in the background.  | read-only: true | validation: format date-time
        - name: deletedDate | type: string | description: Date and time the backup was deleted. Value is `null` if that backup hasn't been deleted.  | read-only: true | validation: format date-time
        - name: sizeInBytes | type: string | description: Backup size in bytes. Value is `null` until the backup process is completed.  | read-only: true | validation: format int64
        - name: collections | type: array<Collection> | description: IDs and display names of collections the backup contains.  | read-only: true | validation: maxItems 1000
           - name: id | type: string | description: Collection GUID.  | read-only: true | validation: maxLength 255
           - name: displayName | type: string | description: Collection display name.  | read-only: true | validation: maxLength 1000
     - name: status | type: Status | description: Status of restoration.  | read-only: true 
         - enum:
         -     PENDING: Restoration from a backup is in progress.
         -     COMPLETED: Restoration from a backup has been successful.
         -     FAILED: Restoration from a backup has failed.
     - name: requestedDate | type: string | description: Date and time the restoration was requested.  | read-only: true | validation: format date-time
     - name: startedDate | type: string | description: Date and time the restoration commenced. Value is `null` until the restoration process begins in the background.  | read-only: true | validation: format date-time
     - name: finishedDate | type: string | description: Date and time the restoration finished. Value is `null` until the restoration process is completed in the background.  | read-only: true | validation: format date-time
     - name: restorationCollections | type: array<RestorationCollection> | description: Restored collections.  | read-only: true | validation: maxItems 1000
        - name: dataCollectionId | type: string | description: Collections to be restored.  Note: If collections have a multi-reference relationship, the preexisting references will be restored if at least one of those collections are restored.  | validation: minLength 1, maxLength 1000
        - name: restoreDestination | type: RestoreDestination | description: Destination where to restore the collection. When not specified destination is taken from backup.  
           - name: dataCollectionId | type: string | description: Collection GUID.  | validation: minLength 1, maxLength 255
           - name: displayName | type: string | description: Collection's display name as shown in the CMS. If empty, `displayName` is taken from `backup.collections`.  | validation: maxLength 1000
  - name: pagingMetadata | type: PagingMetadataV2 | description: Paging information.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  


```

### Examples

### List restorations with additional parameters
```curl
curl -X GET \
'https://www.wixapis.com/wix-data/v2/backups/restorations?status=COMPLETED&paging.offset=0&paging.limit=50' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
```

### List all restorations for a site
```curl
curl -X GET \
'https://www.wixapis.com/wix-data/v2/backups/restorations' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.data.backups.listRestorations(options)
 Description: Retrieves a list of all data restorations from backups.  Results are sorted by requested date, with the newest first.  You can use this method to check whether a restoration initiated with Restore Backup has been completed successfully.
 Method parameters:
   param name: options | type: ListRestorationsOptions  none  
        - name: status | type: array<Status> | description: Statuses to filter by. If provided, only restorations with the specified statuses are listed. For example, to list only completed restorations, use `?status=COMPLETED`. To list completed and pending restorations, use `?status=COMPLETED&status=PENDING`.  Default: No filtering  | validation: maxItems 10
             - enum:
             -     PENDING: Restoration from a backup is in progress.
             -     COMPLETED: Restoration from a backup has been successful.
             -     FAILED: Restoration from a backup has failed.
        - name: paging | type: Paging | description: Offset and limit of items to retrieve.  
           - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, format int32
           - name: offset | type: integer | description: Number of items to skip in the current sort order.  | validation: minimum 0, format int32
 Return type: PROMISE<ListRestorationsResponse>
  - name: restorations | type: array<Restoration> | description: Retrieved restorations.  | validation: maxItems 1000
     - name: _id | type: string | description: Restoration GUID.  | read-only: true | validation: format GUID
     - name: backup | type: Backup | description: Details of the backup used for the restoration.  | read-only: true 
        - name: _id | type: string | description: Backup GUID.  | read-only: true | validation: format GUID
        - name: status | type: Status | description: Backup status.  | read-only: true 
             - enum:
             -     PENDING: Backup creation is in progress.
             -     READY: Backup has been created successfully and can be used for data restoration.
             -     FAILED: Backup creation has failed.
             -     DELETED: Backup has been deleted.
             -     CANCELED: Backup has been canceled.
        - name: type | type: Type | description: Type of backup, based on how it was triggered.  | read-only: true 
             - enum:
             -     ON_DEMAND: Backup taken on demand.
             -     AUTO: Backup taken automatically by the system on a regular schedule.
        - name: requestedDate | type: Date | description: Date and time the backup was requested.  | read-only: true 
        - name: startedDate | type: Date | description: Date and time the backup commenced. Value is `null` until the backup process begins in the background.  | read-only: true 
        - name: finishedDate | type: Date | description: Date and time the backup process finished. Value is `null` until the backup process is completed in the background.  | read-only: true 
        - name: deletedDate | type: Date | description: Date and time the backup was deleted. Value is `null` if that backup hasn't been deleted.  | read-only: true 
        - name: sizeInBytes | type: string | description: Backup size in bytes. Value is `null` until the backup process is completed.  | read-only: true | validation: format int64
        - name: collections | type: array<Collection> | description: IDs and display names of collections the backup contains.  | read-only: true | validation: maxItems 1000
           - name: _id | type: string | description: Collection GUID.  | read-only: true | validation: maxLength 255
           - name: displayName | type: string | description: Collection display name.  | read-only: true | validation: maxLength 1000
     - name: status | type: Status | description: Status of restoration.  | read-only: true 
         - enum:
         -     PENDING: Restoration from a backup is in progress.
         -     COMPLETED: Restoration from a backup has been successful.
         -     FAILED: Restoration from a backup has failed.
     - name: requestedDate | type: Date | description: Date and time the restoration was requested.  | read-only: true 
     - name: startedDate | type: Date | description: Date and time the restoration commenced. Value is `null` until the restoration process begins in the background.  | read-only: true 
     - name: finishedDate | type: Date | description: Date and time the restoration finished. Value is `null` until the restoration process is completed in the background.  | read-only: true 
     - name: restorationCollections | type: array<RestorationCollection> | description: Restored collections.  | read-only: true | validation: maxItems 1000
        - name: dataCollectionId | type: string | description: Collections to be restored.  Note: If collections have a multi-reference relationship, the preexisting references will be restored if at least one of those collections are restored.  | validation: minLength 1, maxLength 1000
        - name: restoreDestination | type: RestoreDestination | description: Destination where to restore the collection. When not specified destination is taken from backup.  
           - name: dataCollectionId | type: string | description: Collection GUID.  | validation: minLength 1, maxLength 255
           - name: displayName | type: string | description: Collection's display name as shown in the CMS. If empty, `displayName` is taken from `backup.collections`.  | validation: maxLength 1000
  - name: pagingMetadata | type: PagingMetadataV2 | description: Paging information.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field.  


```

### Examples

### listRestorations
```javascript
import { backups } from '@wix/data';

async function listRestorations(options) {
  const response = await backups.listRestorations(options);
};
```

### listRestorations (with elevated permissions)
```javascript
import { backups } from '@wix/data';
import { auth } from '@wix/essentials';

async function myListRestorationsMethod(options) {
  const elevatedListRestorations = auth.elevate(backups.listRestorations);
  const response = await elevatedListRestorations(options);
}
```

### listRestorations (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { backups } from '@wix/data';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { backups },
  // Include the auth strategy and host as relevant
});


async function listRestorations(options) {
  const response = await myWixClient.backups.listRestorations(options);
};
```

---