Edit

Share via


Create mailboxRestoreArtifactsBulkAdditionRequest

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 mailboxRestoreArtifactsBulkAdditionRequest object associated with an exchangeRestoreSession.

The following steps describe how to create and manage an exchangeRestoreSession with bulk artifact additions:

  1. Create a new exchangeRestoreSession with empty payload.
  2. Create a new mailboxRestoreArtifactsBulkAdditionRequest object associated with an exchangeRestoreSession.
  3. Get the status of the mailboxRestoreArtifactsBulkAdditionRequest for the Exchange restore session. The initial status upon creation is active and remains in this state until the exchangeRestoreSession is activated.
  4. Activate the exchangeRestoreSession created in the first step.
  5. Monitor the status of the mailboxRestoreArtifactsBulkAdditionRequest. When all the emails are added to the corresponding exchangeRestoreSession, the status of the mailboxRestoreArtifactsBulkAdditionRequest 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

HTTP
POST /solutions/backupRestore/exchangeRestoreSessions/{exchangeRestoreSessionId}/mailboxRestoreArtifactsBulkAdditionRequests

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 mailboxRestoreArtifactsBulkAdditionRequest object.

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

Property Type Description
directoryObjectIds String collection The list of directory object IDs. Optional.
mailboxes String collection The list of email addresses. Optional.

Response

If successful, this method returns a 201 Created response code and a mailboxRestoreArtifactsBulkAdditionRequest 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 mailboxes to the specified Exchange restore session in a bulk operation.

HTTP
POST https://graph.microsoft.com/beta/solutions/backupRestore/exchangeRestoreSessions/dc3a3fc8-eb4b-45eb-9ca6-4955696344b8/mailboxRestoreArtifactsBulkAdditionRequests
Content-Type: application/json

{
  "displayName": "Usermailbox-BulkRestoreArtifacts",
  "mailboxes": [
    "contoso1@micorosft.com",
    "consotos2@microsoft.com",
    "contoso3@microsoft.com"
  ],
  "protectionTimePeriod": {
    "startDateTime": "2021-01-01T00:00:00Z",
    "endDateTime": "2021-01-08T00:00:00Z"
  },
  "destinationType": "new",
  "tags": "fastRestore",
  "restorePointPreference": "latest"
}

Response

The following example shows the response.

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

{
  "id": "b4318e3a-3eae-4ce5-87f3-bad51e1527c4",
  "destinationType": "new",
  "tags": "fastRestore",
  "restorePointPreference": "latest",
  "displayName": "EXO-BulkRestoreArtifacts",
  "status": "active",
  "createdDateTime": "2024-12-03T13:17:19.8862272Z",
  "lastModifiedDateTime": "2024-12-03T13:17:19.8862272Z",
  "mailboxes": [],
  "protectionTimePeriod": {
    "startDateTime": "2024-11-26T00:00:00Z",
    "endDateTime": "2024-12-03T00:00:00Z"
  },
  "createdBy": {
    "user": {
      "identity": "fb70be35-8c8e-4c8a-b55d-f8cd95c5e23a"
    }
  },
  "lastModifiedBy": {
    "user": {
      "identity": "fb70be35-8c8e-4c8a-b55d-f8cd95c5e23a"
    }
  }
}