You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/openapi-spec/v1.0.yaml
+126-3Lines changed: 126 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -468,10 +468,23 @@ paths:
468
468
post:
469
469
tags:
470
470
- drives.root
471
-
summary: Create a drive item
471
+
summary: Create a new DriveItem at the drive root
472
472
operationId: CreateDriveItem
473
473
description: |
474
-
You can use the root childrens endpoint to mount a remoteItem in the share jail. The `@client.synchronize` property of the `driveItem` in the [sharedWithMe](#/me.drive/ListSharedWithMe) endpoint will change to true.
474
+
Create a new folder or DriveItem in a Drive with the drive root as the parent.
The request body must specify exactly one of `folder` (set to `{}` to create a folder), `file` (to create a file item), or `remoteItem` (to mount a shared item; see [sharedWithMe](#/me.drive/ListSharedWithMe) for obtaining the source `remoteItem.id`). Requests with none of these, or with more than one, return 400. Mounting a share changes the `@client.synchronize` property of the `driveItem` in [sharedWithMe](#/me.drive/ListSharedWithMe) to true.
480
+
481
+
The `@libre.graph.conflictBehavior` query parameter controls what happens if a child with the same name already exists.
482
+
483
+
This endpoint also accepts the MS Graph colon-syntax URL form:
484
+
485
+
POST /v1beta1/drives/{drive-id}/root:/{path}:/children
486
+
487
+
OpenAPI cannot express the colon-delimited path segment, so this URL form is not represented as a separate operation in this specification. The server still accepts it, resolves `:/{path}:` as the parent of the new item, and applies `@libre.graph.missingParentsBehavior` to decide whether to create missing intermediate folders.
Controls what happens when a child with the same name already exists. `fail` (default) returns 409; `replace` overwrites the existing item. MS Graph's `rename` value is not supported.
501
+
schema:
502
+
type: string
503
+
enum:
504
+
- fail
505
+
- replace
506
+
default: fail
507
+
- name: '@libre.graph.missingParentsBehavior'
508
+
in: query
509
+
description: |
510
+
Controls what happens when a colon-syntax URL refers to a path whose intermediate folders don't all exist yet. `fail` (default) returns 404; `create` creates the missing intermediate folders before creating the final item. Only meaningful for colon-syntax URLs; ignored otherwise.
511
+
schema:
512
+
type: string
513
+
enum:
514
+
- fail
515
+
- create
516
+
default: fail
484
517
requestBody:
485
-
description: In the request body, provide a JSON object with the following parameters. For mounting a share the necessary remoteItem id and permission id can be taken from the [sharedWithMe](#/me.drive/ListSharedWithMe) endpoint.
518
+
description: In the request body, provide a JSON object describing the new driveItem. Must specify exactly one of `folder`, `file`, or `remoteItem`. For mount-share, see [sharedWithMe](#/me.drive/ListSharedWithMe) for obtaining the source `remoteItem.id` and `permission` id.
Identical request and response shape to the [drive-root variant](#/drives.root/CreateDriveItem), just with an explicit parent item id rather than the drive root.
1366
+
1367
+
The request body must specify exactly one of `folder` (set to `{}` to create a folder) or `file` (to create a file item). Requests with none of these, or with both, return 400. The `@libre.graph.conflictBehavior` query parameter controls what happens if a child with the same name already exists.
1368
+
1369
+
This endpoint also accepts the MS Graph colon-syntax URL form:
1370
+
1371
+
POST /v1beta1/drives/{drive-id}/items/{item-id}:/{path}:/children
1372
+
1373
+
OpenAPI cannot express the colon-delimited path segment, so this URL form is not represented as a separate operation in this specification. The server still accepts it, resolves `:/{path}:` as the parent of the new item (relative to `item-id`), and applies `@libre.graph.missingParentsBehavior` to decide whether to create missing intermediate folders.
Controls what happens when a child with the same name already exists. `fail` (default) returns 409; `replace` overwrites the existing item. MS Graph's `rename` value is not supported.
1395
+
schema:
1396
+
type: string
1397
+
enum:
1398
+
- fail
1399
+
- replace
1400
+
default: fail
1401
+
- name: '@libre.graph.missingParentsBehavior'
1402
+
in: query
1403
+
description: |
1404
+
Controls what happens when a colon-syntax URL refers to a path whose intermediate folders don't all exist yet. `fail` (default) returns 404; `create` creates the missing intermediate folders before creating the final item. Only meaningful for colon-syntax URLs; ignored otherwise.
1405
+
schema:
1406
+
type: string
1407
+
enum:
1408
+
- fail
1409
+
- create
1410
+
default: fail
1411
+
requestBody:
1412
+
description: In the request body, provide a JSON object describing the new driveItem. Must specify exactly one of `folder` or `file`.
0 commit comments