フォルダの一覧取得 (List Folders)
GET/apiv2/pub/foldersdocuments_read
トークンのユーザーがアクセスできるフォルダの一覧を、フルパスのアルファベット順に並べてページネーション形式で返します。
リクエスト
クエリパラメータ
| パラメータ | 型 | デフォルト | 説明 |
|---|---|---|---|
q | string | — | 名前でフィルタリングします(大文字小文字を区別しない部分一致)。 |
parent_id | integer | — | このフォルダの直接の子フォルダのみを対象とします。0 はルートのみを意味します。 |
limit | integer | 50 | ページサイズ。 |
offset | integer | 0 | ページネーションのオフセット。 |
レスポンス
200 OK — フォルダの配列
| フィールド | 型 | 説明 |
|---|---|---|
folder_id | integer | フォルダの一意の ID。 |
name | string | フォルダの表示名(パスの末尾セグメント)。 |
full_path | string | フルパス(例: "Finance->Invoices->2025")。 |
parent_id | integer | 親フォルダの ID。0 はルート。 |
code | string | 一意の UUID コード。 |
child_count | integer | 直接の子フォルダの数。 |
エラー
| ステータス | 理由 |
|---|---|
| 401 | トークンが無効または期限切れです |
| 403 | トークンに documents_read スコープがありません |
cURL
curl -i -X GET "https://portal.docwize.com/apiv2/pub/folders?parent_id=0" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
[
{
"folder_id": 10,
"name": "Finance",
"full_path": "Finance",
"parent_id": 0,
"code": "a1b2c3d4-...",
"child_count": 3
},
{
"folder_id": 42,
"name": "Invoices",
"full_path": "Finance->Invoices",
"parent_id": 10,
"code": "e5f6a7b8-...",
"child_count": 0
}
]