---
title: "List All SharePoint Site Collections"
method: GET
path: "/insync/sharepointmaster/v3/sites"
tags: ["Restore SharePoint Online data"]
---

# List All SharePoint Site Collections

`GET /insync/sharepointmaster/v3/sites`

Retrieve the list of SharePoint site collections.

## Query parameters

- `lastBackupStatus` string[] — Specify the backup status of the SharePoint site for filtering. Set this value to one of the following: `Backup Failed`, `Backed Up With Errors`, `Backed Up Successfully`, `Successful with errors`, `Never Backed Up`, or `Backup Cancelled`. Leave empty to return all sites.
- `searchTerm` string — Specify the title or URL of the SharePoint site for filtering.
- `sortOrder` 'asc' | 'desc' — Specify the sorting order for the results. Use `asc` for ascending or `desc` for descending.
- `sortByColumn` 'siteCollectionId' | 'title' | 'siteStatus' | 'lastBackupStatus' | 'statusDetails' | 'siteType' | 'bulkExportStatus' | 'lastBulkExportStatus' | 'lastCompletedBulkExport' | 'lastSync' | 'backupData' | 'siteCollectionUrl' | 'configurationStatus' | 'appState' — Specify the column name to sort the results. Example: Choose `lastSync` to arrange the results based on the last synchronization time of the SharePoint site.
- `pageSize` integer — Specify the number of records to retrieve per request. For example, if you want to retrieve 100 records in each request, set the `pageSize` as `100`.
- `nextPageToken` string — Specify the token to access the next page of results. Keep this field blank in the first request. Use the token value received in the previous response's parameter 'nextPageToken'.
- `appState` 'Enabled' | 'Disabled' — Specify the status of the SharePoint site for filtering. Set this value to one of the following: `Enabled` or `Disabled`.
- `configurationStatus` 'Configured' | 'Not Configured' — Specify the configuration status of the SharePoint site for filtering. Set this value to one of the following: `Configured` or `Not Configured`
- `siteType` string[] — Specify the type of SharePoint site for filtering. Set this value to one of the following: `MS Teams Site`, `M365 Groups Site`, `MS Teams Private Channel Site` or `Other Site.`
- `bulkExportStatus` string[] — Specify the Bulk Export Status of the SharePoint site for filtering. Set this value to one of the following: `Enabled` or `Disabled`.
- `lastBulkExportStatus` string[] — Specify the Last Bulk Export Status of the SharePoint site for filtering. Set this value to one of the following: `Completed Successfully`, `Failed`, `Completed With Errors` or `Never Exported.`
- `pageNumber` integer — Specify the `pageNumber` parameter to indicate the page of results to retrieve in paginated API requests. For example, when initially calling the API with a `pageSize` of `100`, the first request returns records 1 to 100. Subsequent pages can be fetched using either the `nextPageToken` or `pageNumber` parameter. This parameter allows you to directly retrieve records from a specific page (e.g., records `401` to `500`) by providing the desired page number (e.g., `5`).
- `errors` string[] — Specify a comma-separated list of specific error codes to filter the results. Example: use codes like `SPO-01`, `SPO-02`, and so on.

## Response `200`

success

- 200ListSites
  - `status` integer — SharePoint site status eg. 0-Disabled, 1-Enabled
  - `nextPageToken` string — Token to be used in next request to fetch next page data.
  - `totalResult` integer — Total no of SharePoint sites available with provided filter criteria.
  - `pageSize` integer — Current page size i.e no of records to fetched per page
  - `siteCollections` object[] — List of SharePoint Site Collections
    - `lastSync` integer — Datetime on which the last backup of SharePoint Site was done. 0 in case of Never Backed Up.
    - `siteType` string — Type of SharePoint site. eg. MS Teams Site, M365 Groups Site, MS Teams Private Channel Site, Other Site
    - `siteCollectionId` integer — SharePoint site collection id
    - `siteCollectionUrl` string — SharePoint site collection URL
    - `backupData` integer — Backed up data in bytes.
    - `storageid` integer — Id of storage attached to SharePoint site collection.
    - `backupDataStr` string — Backed up data in human readable text format.
    - `guid` string — Unique id of SharePoint site collection provided by Microsoft.
    - `useDefaultSettings` boolean — Boolean flag indicating whether the SharePoint site collection is using default backup settings or not.
    - `errors` string[] — List of new error codes occurred in recent backup activity of SharePoint sites
    - `titleUrl` string — Url of the summary page of the SharePoint site collection
    - `lastBackupJob` integer — Datetime when the last backup job was run for SharePoint site
    - `title` string — Title of SharePoint site collection
    - `bulkExportStatus` string — Staus indicating if the Bulk Export is Enabled or Disabled for SharePoint site collection.
    - `totalErrorsCount` integer — Total count of errors occured during the backup of SharePoint site collection.
    - `lastActivityId` integer — Id of the last backup activity for SharePoint site collection.
    - `parentId` integer — Id of the parent MS Team or MS Group if SharePoint site belongs to any MS Team or MS Group. Default is 0.
    - `filescurrent` integer — Total no of files backed up currenly.
    - `lastSyncTime` integer — Datetime on which the last backup of SharePoint Site was done. 0 in case of Never Backed Up.
    - `cloudappBackupStatus` integer — Error code indicating the last error occured in last failed back up. 0 if none of the backups are failed.
    - `enabled` integer — No indicating if SharePoint site collection is enabled or disabled for backup. 0-Disabled, 1-Enable.
    - `lastBackupStatus` string — Status of last backup of SharePoint site collection. Eg. Backed Up Successfully, Backed Up With Errors, Never Backed Up, Backup Cancelled, Backup Failed
    - `parentType` integer — Value indicating the type of parent of site if the SharePoint site belongs to any MS Team or Ms Group. Eg. 5-MS Team, 10-MS Group
    - `configured` boolean — Flag indicating if the site is configured for backup or not.
    - `missedFiles` integer — Number of files missed during the last backup.
    - `currentBackupData` integer — Current backed up data in bytes.
    - `totalFiles` integer — Total number of files in SharePoint site collection.
    - `geoLocation` string — Geo location code to which the SharePoint site belongs.
    - `workload` string — Workload of SharePoint site collection. Default SharePoint.
    - `createdOn` integer — Datetime of SharePoint site collection creation
    - `lastSyncFailed` boolean — Flag indicating if the last backup failed. True if last backup failed else False
    - `useDefaultExportSettings` boolean — Flag indicating whether to use default bulk export settings.
    - `lastSuccessfullBackup` integer — Datetime of last successful backup of SharePoint site collection
    - `siteStatusStr` string — SharePoint site collection configuration status string Eg. Configured, Not Configured.
    - `customerId` integer — Druva Customer Id of SharePoint site collection
    - `internalTitle` string — System-defined title of the SharePoint site collection, primarily used for backend processes such as restore.

## Other responses

- `400` — Bad Request
- `401` — The request did not include an authentication token or an expired authentication token was supplied.
- `403` — Access denied: Insufficient permissions. User requires specific access rights and minimum permissions. Details: https://help.druva.com/en/articles/15069296
- `404` — The requested resource was not found.
- `500` — The request was not processed due to an internal error on server.
- `501` — Requested HTTP method is not implemented.

---

[API](https://skmtc.net/druva/apis/authentication.md) · [All operations](https://skmtc.net/druva/apis/authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/druva/authentication/revisions/2af2bf148b25/schema)
