Get or create folders, several levels at once.
POST/api/v1/folders/batch-createfolders:write
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Each item is a folder named name under parent_folder_id (null: a top folder) or under the folder an earlier item made or found (parent_item_index, from 0), so a whole path is one call. A folder that already exists there is answered 200 with that folder and nothing changes; a new one 201 with its grants as create_folder gives them (security: parent by default, group, none or user) and the code it was given. An existing folder you cannot see is that item's 409, never handed back. Needs Create Folders and read access to every named parent. atomic is required.
| スコープ | folders:write |
| 非同期 | いいえ |
| MCP ツール | batch_create_folders |
| Portal の権限 | create_folders |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | BatchBodyOfv1FolderEnsureItemInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
200 | Success. | application/json object または object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict, idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
BatchBodyOfv1FolderEnsureItemInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
atomic | boolean | 必須 | |
items | FolderEnsureItemInput の配列 | 必須 |
Folder
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
code | string | 必須 | |
folder_id | string | 必須 | |
has_children | boolean | 必須 | Whether the folder has child folders the caller can see. |
name | string | 必須 | |
parent_folder_id | string または null | 必須 | null for a root folder |
path | string または null | 必須 | Current ancestor names joined by ->; null without View Folder Tree or current access to every ancestor. |
project | object または null | 必須 | The project the folder is mapped to; null when none, when the caller cannot see it, or without projects:read and View Projects. |
FolderEnsureItemInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
code | string または null | 任意 | The code of a folder this item creates; a generated unique one when absent. An existing folder keeps its code. |
name | string | 必須 | The folder's name. |
parent_folder_id | string または null | 任意 | The folder to find or create it in; null or absent for a top folder, unless parent_item_index names one. |
parent_item_index | integer または null | 任意 | The position, from 0, of an earlier item of this request whose folder is the parent: a path in one call. Not with parent_folder_id. |
security | string: parent, none, user, group または null | 任意 | Who a folder this item creates is shared with besides you: parent (the default), group, none or user, as create_folder. |