Create a folder.
POST/api/v1/foldersfolders:write
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
A new folder takes the parent's grants (not for a top folder) unless security says otherwise (group: your groups; none or user: only you), and always the caller, so it is never visible to nobody. Copying the parent's grants needs View Folder Security; giving users or groups access (by the parent's grants or security group) needs Grant Folder User Access or Grant Folder Group Access. code is the folder's code. A folder with the same name under the same parent is 409 already_exists; batch_create_folders reuses it instead.
| スコープ | folders:write |
| 非同期 | いいえ |
| MCP ツール | create_folder |
| Portal の権限 | create_folders |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 | |
Idempotency-Key | header | string | 任意 | max 255 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | FolderCreateInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
201 | Success. | application/json Folder または 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 | already_exists, 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 のコードです。各コードからそのページに移動できます。
スキーマ
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. |
FolderCreateInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
code | string または null | 任意 | The folder's code (the Portal's Code box); a generated unique one when absent. |
name | string | 必須 | The folder's name. |
parent_folder_id | string または null | 任意 | The folder to create it in; null for a top folder. |
security | string: parent, none, user, group または null | 任意 | Who the folder is shared with besides you: parent (the default: the users and groups the parent has; a top folder has none to copy), group (your groups), none or user (only you, as the dialog's No security and User security give). |