Create siteRestoreArtifactsBulkAdditionRequests

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Create a new siteRestoreArtifactsBulkAdditionRequest object associated with a sharePointRestoreSession.

The following steps describe how to create and manage a sharePointRestoreSession with bulk artifact additions:

  1. Create a new sharePointRestoreSession with empty payload.
  2. Create a new siteRestoreArtifactsBulkAdditionRequest object associated with a sharePointRestoreSession.
  3. Get the status of the siteRestoreArtifactsBulkAdditionRequest for the SharePoint restore session. The initial status upon creation is active and remains in this state until the sharePointRestoreSession is activated.
  4. Activate the sharePointRestoreSession created in the first step.
  5. Monitor the status of the siteRestoreArtifactsBulkAdditionRequest. When all the sites are added to the corresponding sharePointRestoreSession, the status of the siteRestoreArtifactsBulkAdditionRequest changes to completed. If any failures occur during resource resolution, the status changes to completedWithErrors.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permission Higher privileged permissions
Delegated (work or school account) BackupRestore-Restore.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application BackupRestore-Restore.ReadWrite.All Not available.

HTTP request

POST /solutions/backupRestore/sharePointRestoreSessions/{sharePointRestoreSessionId}/siteRestoreArtifactsBulkAdditionRequests

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the siteRestoreArtifactsBulkAdditionRequest object.

You can specify the following properties when you create a siteRestoreArtifactsBulkAdditionRequest object.

Property Type Description
siteIds String collection The list of SharePoint site IDs. Optional.
siteWebUrls String collection The list of SharePoint site URLs. Optional.

Response

If successful, this method returns a 201 Created response code and a siteRestoreArtifactsBulkAdditionRequest object in the response body.

For a list of possible error responses, see Backup Storage API error responses.

Examples

Request

The following example shows a request that adds a list of sites to the specified SharePoint restore session in a bulk operation.

POST https://graph.microsoft.com/beta/solutions/backupRestore/sharePointRestoreSessions/959ba739-70b5-43c4-8c90-b2c22014f18b/siteRestoreArtifactsBulkAdditionRequests
Content-Type: application/json

{
  "displayName": "SPO-BulkRestoreArtifacts",
  "siteWebUrls": [
    "https: //contoso1.sharepoint.com",
    "https: //contoso2.sharepoint.com",
    "https: //contoso3.sharepoint.com"
  ],
  "protectionTimePeriod": {
    "startDateTime": "2024-01-01T00:00:00Z",
    "endDateTime": "2024-01-08T00:00:00Z"
  },
  "destinationType": "new",
  "tags": "fastRestore",
  "restorePointPreference": "latest"
}

Response

The following example shows the response.

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.context": "/solutions/backupRestore/$metadata#siteRestoreArtifactsBulkAdditionRequest/$entity",
  "id": "4437afcf-e520-463c-90a7-ca96401d8039",
  "destinationType": "new",
  "tags": "fastRestore",
  "restorePointPreference": "latest",
  "displayName": "SPO-BulkRestoreArtifacts",
  "status": "active",
  "createdDateTime": "2024-12-03T07:47:57.6011358Z",
  "lastModifiedDateTime": "2024-12-03T07:47:57.6011358Z",
  "siteWebUrls": [],
  "protectionTimePeriod": {
    "startDateTime": "2024-01-01T00:00:00Z",
    "endDateTime": "2024-01-08T00:00:00Z"
  },
  "createdBy": {
    "user": {
      "identity": "fb70be35-8c8e-4c8a-b55d-f8cd95c5e23a"
    }
  },
  "lastModifiedBy": {
    "user": {
      "identity": "fb70be35-8c8e-4c8a-b55d-f8cd95c5e23a"
    }
  }
}