> 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`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # ListBackups # Package: operations # Namespace: BackupService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/operations/backups/list-backups.md ## Permission Scopes: Manage Data Backups: SCOPE.DC-DATA.MANAGE-BACKUPS ## Introduction Retrieves a list of all backups for a site. Results are sorted by requested date, with the newest first. You can use this method to check whether a backup initiated with Create Backup has been completed successfully. --- ## REST API ### Schema ``` Method: listBackups Description: Retrieves a list of all backups for a site. Results are sorted by requested date, with the newest first. You can use this method to check whether a backup initiated with Create Backup has been completed successfully. URL: https://www.wixapis.com/wix-data/v2/backups Method: GET Method parameters: param name: paging | type: Paging - name: limit | type: integer | description: Number of items to load. - name: offset | type: integer | description: Number of items to skip in the current sort order. query param name: status | type: array | description: Statuses to filter by. If provided, only backups with the specified statuses are listed. For example, to list only completed backups, use `?status=READY`. To list completed and pending backups, use `?status=READY&status=PENDING`. Default: No filtering - 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. query param name: type | type: array | description: Type to filter by. If provided, only backups of the specified type are listed. Default: No filtering - enum: - ON_DEMAND: Backup taken on demand. - AUTO: Backup taken automatically by the system on a regular schedule. Return type: ListBackupsResponse - name: backups | type: array | description: Retrieved backups. - name: id | type: string | description: Backup GUID. - name: status | type: Status | description: Backup status. - 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. - 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. - name: startedDate | type: string | description: Date and time the backup commenced. Value is `null` until the backup process begins in the background. - name: finishedDate | type: string | description: Date and time the backup process finished. Value is `null` until the backup process is completed in the background. - name: deletedDate | type: string | description: Date and time the backup was deleted. Value is `null` if that backup hasn't been deleted. - name: sizeInBytes | type: string | description: Backup size in bytes. Value is `null` until the backup process is completed. - name: collections | type: array | description: IDs and display names of collections the backup contains. - name: id | type: string | description: Collection GUID. - name: displayName | type: string | description: Collection display name. - name: pagingMetadata | type: PagingMetadataV2 | description: Paging information. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - 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. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. ``` ### Examples ### List all backups for a site ```curl curl -X GET \ 'https://www.wixapis.com/wix-data/v2/backups' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ``` ### List backups with additional parameters ```curl curl -X GET \ 'https://www.wixapis.com/wix-data/v2/backups?status=READY&type=ON_DEMAND&paging.offset=0&paging.limit=50' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.operations.BackupService.listBackups(options) Description: Retrieves a list of all backups for a site. Results are sorted by requested date, with the newest first. You can use this method to check whether a backup initiated with Create Backup has been completed successfully. Method parameters: param name: options | type: ListBackupsOptions none - name: status | type: array | description: Statuses to filter by. If provided, only backups with the specified statuses are listed. For example, to list only completed backups, use `?status=READY`. To list completed and pending backups, use `?status=READY&status=PENDING`. Default: No filtering - 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: array | description: Type to filter by. If provided, only backups of the specified type are listed. Default: No filtering - enum: - ON_DEMAND: Backup taken on demand. - AUTO: Backup taken automatically by the system on a regular schedule. - name: paging | type: Paging | description: Paging preferences. - name: limit | type: integer | description: Number of items to load. - name: offset | type: integer | description: Number of items to skip in the current sort order. Return type: PROMISE - name: backups | type: array | description: Retrieved backups. - name: _id | type: string | description: Backup GUID. - name: status | type: Status | description: Backup status. - 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. - 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. - name: startedDate | type: Date | description: Date and time the backup commenced. Value is `null` until the backup process begins in the background. - name: finishedDate | type: Date | description: Date and time the backup process finished. Value is `null` until the backup process is completed in the background. - name: deletedDate | type: Date | description: Date and time the backup was deleted. Value is `null` if that backup hasn't been deleted. - name: sizeInBytes | type: string | description: Backup size in bytes. Value is `null` until the backup process is completed. - name: collections | type: array | description: IDs and display names of collections the backup contains. - name: _id | type: string | description: Collection GUID. - name: displayName | type: string | description: Collection display name. - name: pagingMetadata | type: PagingMetadataV2 | description: Paging information. - name: count | type: integer | description: Number of items returned in the response. - name: offset | type: integer | description: Offset that was requested. - 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. - name: tooManyToCount | type: boolean | description: Flag that indicates the server failed to calculate the `total` field. ``` ### Examples ### listBackups ```javascript import { backups } from '@wix/data'; async function listBackups(options) { const response = await backups.listBackups(options); }; ``` ### listBackups (with elevated permissions) ```javascript import { backups } from '@wix/data'; import { auth } from '@wix/essentials'; async function myListBackupsMethod(options) { const elevatedListBackups = auth.elevate(backups.listBackups); const response = await elevatedListBackups(options); } ``` ### listBackups (self-hosted) Self-hosted 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 listBackups(options) { const response = await myWixClient.backups.listBackups(options); }; ``` ---