メインコンテンツまでスキップ

フォルダの一覧取得 (List Folders)

GET/apiv2/pub/foldersdocuments_read

トークンのユーザーがアクセスできるフォルダの一覧を、フルパスのアルファベット順に並べてページネーション形式で返します。

リクエスト​

クエリパラメータ​

パラメータ型デフォルト説明
qstring—名前でフィルタリングします(大文字小文字を区別しない部分一致)。
parent_idinteger—このフォルダの直接の子フォルダのみを対象とします。0 はルートのみを意味します。
limitinteger50ページサイズ。
offsetinteger0ページネーションのオフセット。

レスポンス​

200 OK — フォルダの配列

フィールド型説明
folder_idintegerフォルダの一意の ID。
namestringフォルダの表示名(パスの末尾セグメント)。
full_pathstringフルパス(例: "Finance->Invoices->2025")。
parent_idinteger親フォルダの ID。0 はルート。
codestring一意の UUID コード。
child_countinteger直接の子フォルダの数。

エラー​

ステータス理由
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
}
]
{"detail": "Invalid or expired token"}