Skip to content

Commit b539f94

Browse files
authored
Merge pull request #25266 from microsoftgraph/user/neminshah/BackupRestore_BulkAdditionJobs
Adding BulkAdditionJobs APIs into Backup Restore
2 parents af1b655 + 0e4a09f commit b539f94

File tree

29 files changed

+1711
-2
lines changed

29 files changed

+1711
-2
lines changed
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
title: "Get driveProtectionUnitsBulkAdditionJob"
3+
description: "Get a driveProtectionUnitsBulkAdditionJob in a OneDrive protection policy."
4+
author: "neminbshah"
5+
ms.localizationpriority: medium
6+
ms.subservice: "m365-backup-storage"
7+
doc_type: apiPageType
8+
---
9+
10+
# Get driveProtectionUnitsBulkAdditionJob
11+
12+
Namespace: microsoft.graph
13+
14+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
15+
16+
Get a [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object by the ID associated with a [oneDriveForBusinessProtectionPolicy](../resources/onedriveforbusinessprotectionpolicy.md).
17+
18+
[!INCLUDE [national-cloud-support](../../includes/global-only.md)]
19+
20+
## Permissions
21+
22+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
23+
24+
<!-- { "blockType": "permissions", "name": "driveprotectionunitsbulkadditionjobs_get" } -->
25+
[!INCLUDE [permissions-table](../includes/permissions/driveprotectionunitsbulkadditionjobs-get-permissions.md)]
26+
27+
## HTTP request
28+
29+
<!-- {
30+
"blockType": "ignored"
31+
}
32+
-->
33+
34+
``` http
35+
GET /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/{driveProtectionPolicyId}/driveProtectionUnitsBulkAdditionJobs/{driveProtectionUnitsBulkAdditionJobId}
36+
```
37+
38+
## Request headers
39+
40+
|Name|Description|
41+
|:---|:---|
42+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
43+
44+
## Request body
45+
46+
Don't supply a request body for this method.
47+
48+
## Response
49+
50+
If successful, this method returns a `200 OK` response code and a [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object in the response body.
51+
52+
## Examples
53+
54+
### Request
55+
56+
The following example shows a request.
57+
58+
<!-- {
59+
"blockType": "request",
60+
"name": "driveprotectionunitsbulkadditionjobs_get"
61+
}
62+
-->
63+
64+
``` http
65+
GET https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/driveProtectionUnitsBulkAdditionJobs/71633878-8321-4950-bfaf-ed285bdd1461
66+
```
67+
68+
### Response
69+
70+
The following example shows the response.
71+
72+
<!-- {
73+
"blockType": "response",
74+
"truncated": true,
75+
"@odata.type": "microsoft.graph.driveProtectionUnitsBulkAdditionJob"
76+
}
77+
-->
78+
79+
``` http
80+
HTTP/1.1 200 OK
81+
Content-Location: https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/driveProtectionUnitsBulkAdditionJobs/61633878-8321-4950-bfaf-ed285bdd1461
82+
83+
{
84+
"@odata.type": "#microsoft.graph.driveProtectionUnitsBulkAdditionJob",
85+
"id":"61633878-8321-4950-bfaf-ed285bdd1461",
86+
"displayName" : "drives-I",
87+
"drives" : ["amala@contoso.com", "conrad@contoso.com", "lothar@contoso.com"],
88+
"directoryObjectIds": ["71633878-8321-4950-bfaf-ed285bdd1461"],
89+
"status" : "CompletedWithErrors",
90+
"createdBy":{
91+
"application":{
92+
"id":"1fec8e78-bce4-4aaf-ab1b-5451cc387264"
93+
},
94+
"user":{
95+
"id":"845457dc-4bb2-4815-bef3-8628ebd1952e"
96+
}
97+
},
98+
"createdDateTime":"2015-06-19T12-01-03.45Z",
99+
"lastModifiedBy":{
100+
"application":{
101+
"id":"1fec8e78-bce4-4aaf-ab1b-5451cc387264"
102+
},
103+
"user":{
104+
"id":"845457dc-4bb2-4815-bef3-8628ebd1952e"
105+
}
106+
},
107+
"lastModifiedDateTime":"2015-06-19T12-01-03.45Z",
108+
"error":{
109+
"code" : "ProtectionResourcesNotFound",
110+
"message": "Errors while resolving protection resources",
111+
"details":
112+
[
113+
{
114+
"code": "EmailNotFound",
115+
"message": "Email address 'amala@contoso.com' not found in directory",
116+
"target" : "amala@contoso.com"
117+
},
118+
{
119+
"code": "EmailNotFound",
120+
"message": "Email address 'conrad@contoso.com' not found in directory",
121+
"target" : "conrad@contoso.com"
122+
},
123+
{
124+
"code": "EmailNotFound",
125+
"message": "Email address 'lothar@contoso.com' not found in directory",
126+
"target" : "lothar@contoso.com"
127+
}
128+
]
129+
}
130+
}
131+
```
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: "Create driveProtectionUnitsBulkAdditionJob"
3+
description: "Create driveProtectionUnitsBulkAdditionJob for a OneDrive protection policy."
4+
author: "neminbshah"
5+
ms.localizationpriority: medium
6+
ms.subservice: "m365-backup-storage"
7+
doc_type: apiPageType
8+
---
9+
10+
# Create driveProtectionUnitsBulkAdditionJob
11+
12+
Namespace: microsoft.graph
13+
14+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
15+
16+
Create a [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object associated with a [oneDriveForBusinessProtectionPolicy](../resources/onedriveforbusinessprotectionpolicy.md).
17+
18+
The initial status upon creation of the job is `active`. When all the `drives` and `directoryObjectIds` are added into the corresponding OneDrive protection policy, the status of job is `completed`.
19+
20+
If any failures occur, the status of the job eventually is `completedWithErrors`.
21+
[!INCLUDE [national-cloud-support](../../includes/global-only.md)]
22+
23+
## Permissions
24+
25+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
26+
27+
<!-- { "blockType": "permissions", "name": "driveprotectionunitsbulkadditionjobs_post" } -->
28+
[!INCLUDE [permissions-table](../includes/permissions/driveprotectionunitsbulkadditionjobs-post-permissions.md)]
29+
30+
## HTTP request
31+
32+
<!-- {
33+
"blockType": "ignored"
34+
}
35+
-->
36+
``` http
37+
POST /solutions/backupRestore/oneDriveForBusinessProtectionPolicies/{oneDriveForBusinessProtectionPolicyId}/driveProtectionUnitsBulkAdditionJobs
38+
```
39+
40+
## Request headers
41+
42+
|Name|Description|
43+
|:---|:---|
44+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
45+
|Content-Type|application/json|
46+
47+
## Request body
48+
49+
In the request body, include a JSON representation of the [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object.
50+
51+
## Response
52+
53+
If successful, this method returns a `201 Created` response code and a [driveProtectionUnitsBulkAdditionJob](../resources/driveprotectionunitsbulkadditionjob.md) object in the response body.
54+
55+
## Examples
56+
57+
### Request
58+
59+
The following example shows a request.
60+
61+
<!-- {
62+
"blockType": "request",
63+
"name": "driveprotectionunitsbulkadditionjobs_post"
64+
}
65+
-->
66+
67+
```http
68+
POST https://graph.microsoft.com/beta/solutions/backupRestore/oneDriveForBusinessProtectionPolicies/71633878-8321-4950-bfaf-ed285bdd1461/driveProtectionUnitsBulkAdditionJobs
69+
Content-Type: application/json
70+
71+
{
72+
"displayName" : "drives-I",
73+
"drives" : ["amala@contoso.com", "conrad@contoso.com", "lothar@contoso.com"],
74+
"directoryObjectIds" : ["1fec4e78-bce4-4aaf-ab1b-5451cc387264"]
75+
}
76+
77+
```
78+
79+
---
80+
81+
### Response
82+
83+
The following example shows the response.
84+
<!-- {
85+
"blockType": "response",
86+
"truncated": true,
87+
"@odata.type": "microsoft.graph.driveProtectionUnitsBulkAdditionJob"
88+
}
89+
-->
90+
``` http
91+
HTTP/1.1 201 Created
92+
Content-type: application/json
93+
94+
{
95+
"@odata.type": "#microsoft.graph.driveProtectionUnitsBulkAdditionJob",
96+
"id" :"71633878-8321-4950-bfaf-ed285bdd1461",
97+
"displayName" : "drives-I",
98+
"status" : "active",
99+
"drives" : ["amala@contoso.com", "conrad@contoso.com", "lothar@contoso.com"],
100+
"directoryObjectIds" : ["1fec4e78-bce4-4aaf-ab1b-5451cc387264"],
101+
"createdBy":{
102+
"application":{
103+
"id":"1fec8e78-bce4-4aaf-ab1b-5451cc387264"
104+
},
105+
"user":{
106+
"id":"845457dc-4bb2-4815-bef3-8628ebd1952e"
107+
}
108+
},
109+
"createdDateTime":"2015-06-19T12-01-03.45Z",
110+
"lastModifiedBy":{
111+
"application":{
112+
"id":"1fec8e78-bce4-4aaf-ab1b-5451cc387264"
113+
},
114+
"user":{
115+
"id":"845457dc-4bb2-4815-bef3-8628ebd1952e"
116+
}
117+
},
118+
"lastModifiedDateTime":"2015-06-19T12-01-03.45Z",
119+
}
120+
```

0 commit comments

Comments
 (0)