Skip to content

Commit 08d6e36

Browse files
authored
Merge branch 'main' into yuyaolian/v1-breakoutrooom-etc
2 parents 26d722a + 5211796 commit 08d6e36

File tree

7 files changed

+193
-46
lines changed

7 files changed

+193
-46
lines changed

api-reference/beta/api/driveitem-copy.md

Lines changed: 121 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ This method supports the `@microsoft.graph.conflictBehavior` query parameter to
4343

4444
| Value | Description |
4545
|:----------------|:---------------------------------------------- |
46-
| fail | Default behavior is to report the failure. |
47-
| replace | Overwrite existing item at the target site. |
48-
| rename | Rename the item. |
46+
| fail | The entire operation fails when a conflict occurs. This behavior is the default if no option is specified. |
47+
| replace | The preexisting file item is deleted and replaced with the new item when a conflict occurs. This option is only supported for file items. The new item has the same name as the old one. The old item's history is deleted. |
48+
| rename | Appends the lowest integer that guarantees uniqueness to the name of the new file or folder and completes the operation. |
4949

50+
If you specify `@microsoft.graph.conflictBehavior=replace` for a source folder item, this API returns a `202 Accepted` response. In this case, querying the monitoring url reports a `nameAlreadyExists` error. If you specify this parameter with the `childrenOnly` parameter, a nameAlreadyExists error occurs if there are any folder items in the source item's children.
5051

5152
>[!NOTE]
5253
>The `conflictBehavior` parameter isn't supported for OneDrive Consumer.
@@ -60,14 +61,17 @@ In the request body, provide a JSON object with the following parameters.
6061
| parentReference | [ItemReference](../resources/itemreference.md) | Optional. Reference to the parent item the copy is created in. |
6162
| name | string | Optional. The new name for the copy. If this information isn't provided, the same name is used as the original. |
6263
| childrenOnly | Boolean | Optional. If set to `true`, the children of the **driveItem** are copied but not the **driveItem** itself. The default value is `false`. Valid _only_ on folder items. |
63-
| includeAllVersionHistory | Boolean | Optional. If set to `true`, source files version history (major versions and minor versions, if any) should be copied to the destination, within the target version setting limit. If `false`, only the latest major version is copied to the destination. The default value is `false`. |
64+
| includeAllVersionHistory | Boolean | Optional. If set to `true`, source files version history (major versions and minor versions, if any) should be copied to the destination, within the target version setting limit. If `false`, only the latest major version is copied to the destination. The default value is `false`. |
6465

6566

6667
>[!NOTE]
6768
>The `parentReference` parameter should include the `driveId` and `id` parameters for the target folder.
6869
>
6970
>In a single request, the `childrenOnly` option copies 150 children items, and for the grandchildren items the SharePoint limit applies. For more information, see [SharePoint limitation](/office365/servicedescriptions/sharepoint-online-service-description/sharepoint-online-limits#moving-and-copying-across-sites)
7071
72+
> If you use the `@microsoft.graph.conflictBehavior` query parameter with the `childrenOnly` parameter, then every child in the operation will be subject to the `@microsoft.graph.conflictBehavior` specified.
73+
74+
7175
## Response
7276

7377
The response returns details about how to [monitor the progress](/graph/long-running-actions-overview) of the copy, upon accepting the request. The response indicates whether the copy operation was accepted or rejected - for example, if the destination filename is already in use.
@@ -76,7 +80,7 @@ The response returns details about how to [monitor the progress](/graph/long-run
7680

7781
### Example 1: Copy a file to a folder
7882

79-
The following example copies a file identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
83+
The following example copies a file identified by `{item-id}` into a folder identified by the `driveId` and `id` values.
8084
The new copy of the file is named `contoso plan (copy).txt`.
8185

8286
#### Request
@@ -141,9 +145,9 @@ HTTP/1.1 202 Accepted
141145
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/4A3407B5-88FC-4504-8B21-0AABD3412717
142146
```
143147

144-
### Example 2: Copy the children in a folder
148+
### Example 2: Copy the child items in a folder
145149

146-
The following example copies the children in a folder identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
150+
The following example copies the children in a folder identified by `{item-id}` into a folder identified by the `driveId` and `id` values.
147151
The `childrenOnly` parameter is set to true.
148152

149153
#### Request
@@ -206,12 +210,27 @@ The following example shows the response.
206210
HTTP/1.1 202 Accepted
207211
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/4A3407B5-88FC-4504-8B21-0AABD3412717
208212
```
209-
Monitoring is important because the copy operation with childrenOnly occurs across multiple operations.
210213

211-
### Example 3: Copy the children in a folder with name conflict
214+
The `Location` field of the response contains a monitoring URL that you can use to check the progress of the copy operation. Because copy operations happen asynchronously and can finish after an unspecified amount of time, you can use this URL repeatedly to track its status.
212215

213-
The following example attempts to copy the children in a folder identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
214-
The destination already has the same name found at the source. The operation is accepted but it encounters a failure during processing.
216+
To receive a status report similar to the one in the following example, GET the URL in the `Location` field of the response.
217+
```
218+
{
219+
"@odata.context": "https://https://contoso.sharepoint.com/sites/site1/_api/v2.1/$metadata#drives('driveId')/operations/$entity",
220+
"id": "049af13f-d177-4c70-aed0-eb6f04a5d88b",
221+
"createdDateTime": "0001-01-01T00:00:00Z",
222+
"lastActionDateTime": "0001-01-01T00:00:00Z",
223+
"percentageComplete": 100,
224+
"percentComplete": 100,
225+
"resourceId": "016OGUCSF6Y2GOVW7725BZO354PWSELRRZ",
226+
"resourceLocation": "https://https://contoso.sharepoint.com/sites/site2/_api/v2.0/drives/b!1YwGyNd6RUuVB42eCVw7ULlXybr_-09Br67iDGnYY-neBqwZd6jJRJbgCTx0On5n/items/016OGUCSF6Y2GOVW7725BZO354PWSELRRZ",
227+
"status": "completed"
228+
}
229+
```
230+
231+
### Example 3: Failure to copy a file item to a folder with a preexisting item with the same name
232+
233+
The following example attempts to copy a file item identified by `{item-id}` into a folder identified by the `driveId` and `id` property values. In this example, the destination already has a file with the same name. However, because the request doesn't specify a `@microsoft.graph.conflictBehavior` query parameter value of either `replace` or `rename`, the operation is accepted but fails during processing.
215234

216235
#### Request
217236
# [HTTP](#tab/http)
@@ -273,7 +292,7 @@ HTTP/1.1 202 Accepted
273292
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/4A3407B5-88FC-4504-8B21-0AABD3412717
274293
```
275294

276-
Follow the monitor url.
295+
The following example shows an example status report obtained by visiting the URL in the value of the `Location` field in the response to the initial request.
277296
```http
278297
{
279298
"id": "46cf980a-28e1-4623-b8d0-11fc5278efe6",
@@ -286,13 +305,13 @@ Follow the monitor url.
286305
}
287306
}
288307
```
289-
To resolve this error, use the optional query parameter [@microsoft.graph.conflictBehavior](#optional-query-parameters).
290308

291-
### Example 4: Copy the children in a folder with name conflict setting conflictBehavior
309+
To resolve this error, use the optional query parameter [@microsoft.graph.conflictBehavior](#optional-query-parameters) as seen in the [next example](#example-4-copy-a-file-item-to-a-folder-with-a-preexisting-item-with-the-same-name-by-specifying-the-microsoftgraphconflictbehavior-query-parameter).
292310

293-
The following example copies the children in a folder identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
294-
The optional query parameter @microsoft.graph.conflictBehavior is set to replace. The possible values are `replace`, `rename`, or `fail`.
295-
The destination already has the same name found at the source.
311+
### Example 4: Copy a file item to a folder with a preexisting item with the same name by specifying the @microsoft.graph.conflictBehavior query parameter
312+
313+
The following example copies a file item identified by `{item-id}` into a folder identified by the `driveId` and `id` values.
314+
In this example, the destination already has a file with the same name. The query parameter `@microsoft.graph.conflictBehavior` is set to replace. The possible values are `replace`, `rename`, or `fail`.
296315

297316
#### Request
298317
# [HTTP](#tab/http)
@@ -354,9 +373,76 @@ HTTP/1.1 202 Accepted
354373
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/4A3407B5-88FC-4504-8B21-0AABD3412717
355374
```
356375

357-
### Example 5: Copy operation preserve version history
376+
### Example 5: Failure to copy child items that contain a folder item by specifying @microsoft.graph.conflictBehavior as replace
358377

359-
The following example copies the item identified by `{item-id}` into a folder identified with a `driveId` and `id` value. It also copies the version history to the target folder. If the source file contains 20 versions and the destination version limit setting is 10, the copy only transfers the maximum number of versions the destination site allows, starting from the most recent.
378+
The following example attempts to copy the child items in a folder identified by `{item-id}` into a folder identified by the `driveId` and `id` values. One of the child items is a folder item. The destination might have items with colliding names to the children at the source folder. The request attempts to resolve potential name conflicts by setting the optional query parameter `@microsoft.graph.conflictBehavior` to replace. The request is accepted but the monitoring url reports failures. Instead use `rename` or `fail` if at least one of the children is a folder item.
379+
380+
#### Request
381+
<!-- { "blockType": "request", "name": "copy-item-conflicts", "scopes": "files.readwrite", "target": "action" } -->
382+
383+
```http
384+
POST https://graph.microsoft.com/beta/me/drive/items/{item-id}/copy?@microsoft.graph.conflictBehavior=replace
385+
Content-Type: application/json
386+
387+
{
388+
"parentReference": {
389+
"driveId": "b!s8RqPCGh0ESQS2EYnKM0IKS3lM7GxjdAviiob7oc5pXv_0LiL-62Qq3IXyrXnEop",
390+
"id": "DCD0D3AD-8989-4F23-A5A2-2C086050513F"
391+
},
392+
"childrenOnly": true
393+
}
394+
```
395+
396+
397+
#### Response
398+
399+
The following example shows the response.
400+
401+
<!-- { "blockType": "response" } -->
402+
```http
403+
HTTP/1.1 202 Accepted
404+
Location: https://contoso.sharepoint.com/_api/v2.0/monitor/4A3407B5-88FC-4504-8B21-0AABD3412717
405+
```
406+
407+
Visiting the monitoring URL yields a status report similar to the following example.
408+
409+
<!-- { "blockType": "ignored" } -->
410+
```http
411+
{
412+
"@odata.context": "https://contoso.sharepoint.com/sites/site2/_api/v2.1/$metadata#drives('driveId')/operations/$entity",
413+
"id": "e410fb22-fc84-41df-ac9f-e95e5110a5cb",
414+
"createdDateTime": "0001-01-01T00:00:00Z",
415+
"lastActionDateTime": "0001-01-01T00:00:00Z",
416+
"status": "failed",
417+
"error": {
418+
"message": "Errors occurred during copy/move operation.",
419+
"details": [
420+
{
421+
"code": "nameAlreadyExists",
422+
"message": "Name already exists"
423+
},
424+
{
425+
"code": "nameAlreadyExists",
426+
"message": "Name already exists"
427+
},
428+
{
429+
"code": "nameAlreadyExists",
430+
"message": "Name already exists",
431+
"target": "01E4CGZM4FGUVRMKSJWBCLZQTWNFGHOTXG"
432+
},
433+
{
434+
"code": "nameAlreadyExists",
435+
"message": "Name already exists",
436+
"target": "01E4CGZM2XRHETBOUOYVA2OKZFMGGBQ6VU"
437+
}
438+
]
439+
}
440+
}
441+
```
442+
443+
### Example 6: Copy item to a destination folder and preserve its version history
444+
445+
The following example copies the item identified by `{item-id}` into a folder identified by the `driveId` and `id` values. It also copies the version history to the target folder. If the source file contains more versions than the destination version limit setting, the copy only transfers the maximum number of newest versions that the destination site allows.
360446

361447
#### Request
362448

@@ -421,11 +507,11 @@ Location: https://contoso.sharepoint.com/_api/v2.0/monitor/4A3407B5-88FC-4504-8B
421507
422508
```
423509

424-
### Example 6: Copy the children in a folder from root
510+
### Example 7: Failure to copy child items in a root folder without specifying the childreOnly parameter as true
425511

426-
The following example attempts to copy the children in a folder identified by `{item-id}` (also known as root) into a folder identified with a `driveId` and `id` value.
512+
The following example attempts to copy the child items in the folder identified by `{item-id}`, also known as "root," into a folder identified by the `driveId` and `id` values.
427513
The `childrenOnly` parameter isn't set to true.
428-
The request fails because the copy operation can't be done in the root folder.
514+
The request fails because the copy operation can't be done on the root folder.
429515

430516
#### Request
431517
<!-- { "blockType": "ignored", "name": "copy-item-6" } -->
@@ -444,7 +530,7 @@ Content-Type: application/json
444530

445531
#### Response
446532

447-
The following example shows the response.
533+
Visiting the monitoring URL yields a status report similar to the following example.
448534

449535
<!-- { "blockType": "ignored" } -->
450536
```http
@@ -468,10 +554,10 @@ Content-Length: 283
468554
```
469555
To resolve this error, set the `childrenOnly` parameter to true.
470556

471-
### Example 7: Copy the children in a folder where source has more than 150 direct children
557+
### Example 8: Failure to copy more than 150 direct child items
472558

473-
The following example attempts to copy the children in a folder identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
474-
The `childrenOnly` parameter is set to true. The drive item identified by `{item-id}` contains more than 150 direct children.
559+
The following example attempts to copy the children in a folder identified by `{item-id}` into a folder identified by the `driveId` and `id` values.
560+
The `childrenOnly` parameter is set to true. The source folder item identified by `{item-id}` contains more than 150 direct children.
475561
The request fails because the limit is 150 direct children.
476562

477563
#### Request
@@ -485,13 +571,14 @@ Content-Type: application/json
485571
"parentReference": {
486572
"driveId": "b!s8RqPCGh0ESQS2EYnKM0IKS3lM7GxjdAviiob7oc5pXv_0LiL-62Qq3IXyrXnEop",
487573
"id": "DCD0D3AD-8989-4F23-A5A2-2C086050513F"
488-
}
574+
},
575+
"childrenOnly": true
489576
}
490577
```
491578

492579
#### Response
493580

494-
The following example shows the response.
581+
Visiting the monitoring URL yields a status report similar to the following example.
495582

496583
<!-- { "blockType": "ignored" } -->
497584
```http
@@ -516,9 +603,9 @@ Content-Length: 341
516603
```
517604
To resolve this error, reorganize the source folder structure only to have 150 children.
518605

519-
### Example 8: Copy the children where the source item is a file
606+
### Example 9: Failure to copy the child items of a file item
520607

521-
The following example attempts to copy the children in a folder identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
608+
The following example attempts to copy the children of a source item identified by `{item-id}` into a folder identified by the `driveId` and `id` values.
522609
The `{item-id}` refers to a file, not a folder. The `childrenOnly` parameter is set to true.
523610
The request fails since the `{item-id}` is a nonfolder driveItem.
524611

@@ -540,7 +627,7 @@ Content-Type: application/json
540627

541628
#### Response
542629

543-
The following example shows the response.
630+
Visiting the monitoring URL yields a status report similar to the following example.
544631

545632
<!-- { "blockType": "ignored" } -->
546633
```http
@@ -563,11 +650,9 @@ Content-Length: 290
563650
}
564651
```
565652

566-
### Example 9: Copy the children in a folder with childrenOnly and name
653+
### Example 10: Failure to copy child items by specifying both the childrenOnly and name request body parameters
567654

568-
The following example attempts to copy the children in a folder identified by `{item-id}` into a folder identified with a `driveId` and `id` value.
569-
The `childrenOnly` parameter is set to true and specify a `name` value.
570-
The request fails because `childrenOnly` and `name` can't be used together.
655+
The following example attempts to copy the child items in a folder identified by `{item-id}` into a folder identified by the `driveId` and `id` values. The request body sets the `childrenOnly` parameter to true and also specifies a `name` value. The request fails as the `childrenOnly` and `name` parameters are mutually exclusive.
571656

572657
#### Request
573658
<!-- { "blockType": "ignored", "name": "copy-item-9" } -->
@@ -629,6 +714,4 @@ For error information, see [Error responses][error-response].
629714
"suppressions": [
630715
]
631716
}
632-
-->
633-
634-
717+
-->

api-reference/v1.0/api/onlinemeeting-update.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ The last column indicates whether updating this property will take effect for an
9595
| allowMeetingChat | meetingChatMode | Specifies the mode of meeting chat. | Yes |
9696
| allowPowerPointSharing | Boolean | Indicates whether PowerPoint live is enabled for the meeting. | No |
9797
| allowTeamworkReactions | Boolean | Indicates whether Teams reactions are enabled for the meeting. | Yes |
98+
| allowedLobbyAdmitters | [allowedLobbyAdmitterRoles](../resources/onlinemeetingbase.md#allowedlobbyadmitterroles-values) | Specifies the users who can admit from the lobby. Possible values are: `organizerAndCoOrganizersAndPresenters`, `organizerAndCoOrganizers`, `unknownFutureValue`. | Yes |
9899
| allowWhiteboard | Boolean | Indicates whether whiteboard is enabled for the meeting. Inherited from [onlineMeetingBase](../resources/onlinemeetingbase.md). |
99100
| endDateTime | DateTime | The meeting end time in UTC. | No |
100101
| isEntryExitAnnounced | Boolean | Whether or not to announce when callers join or leave. | Yes |

0 commit comments

Comments
 (0)