Get Folders List

View as Markdown
## Get Folders List Retrieves the list of folders for the authenticated user. You can optionally filter folders by **parent folder ID**. **Method:** `GET` **URL:** `{{base_url}}/folders` --- ## Authentication This endpoint requires authentication. Use a **Bearer token** in the `Authorization` header: ```http Authorization: Bearer {{access_token}} ``` --- ## Headers | Header | Value | |---|---| | Authorization | Bearer {{access_token}} | --- ## Query Parameters | Parameter | Type | Required | Description | |---|---|---|---| | `parent_id` | integer | No | Filter folders by parent folder ID. If omitted, returns all folders or root folders depending on implementation. | Example: ``` {{base_url}}/folders?parent_id={{parent_id}} ``` --- ## Required Variables | Variable | Required | Description | |---|---|---| | `base_url` | Yes | Base API URL | | `access_token` | Yes | Authentication access token | | `parent_id` | No | Parent folder ID used for filtering | --- ## Sample Request ```bash curl --request GET "{{base_url}}/folders?parent_id={{parent_id}}" \ --header "Authorization: Bearer {{access_token}}" ``` --- ## Sample Success Response A successful request typically returns **HTTP 200 OK**. ```json { "success": true, "data": [ { "id": 8, "user_id": "43028", "name": "Campaign Photos", "parent_id": 5, "is_system": false, "file_count": 2, "created_at": "2026-03-09T11:24:52.000000Z", "updated_at": "2026-03-09T13:27:18.000000Z", "deleted_at": null, "children": [] }, { "id": 9, "user_id": "43028", "name": "test", "parent_id": null, "is_system": false, "file_count": 1, "created_at": "2026-03-09T13:09:49.000000Z", "updated_at": "2026-03-10T06:23:09.000000Z", "deleted_at": null, "children": [ { "id": 10, "user_id": "43028", "name": "test2", "parent_id": 9, "is_system": false, "file_count": 14, "created_at": "2026-03-09T13:10:07.000000Z", "updated_at": "2026-03-10T05:34:50.000000Z", "deleted_at": null } ] }, { "id": 10, "user_id": "43028", "name": "test2", "parent_id": 9, "is_system": false, "file_count": 14, "created_at": "2026-03-09T13:10:07.000000Z", "updated_at": "2026-03-10T05:34:50.000000Z", "deleted_at": null, "children": [] } ] } ``` --- ## Response Fields | Field | Type | Description | |---|---|---| | `id` | integer | Folder ID | | `user_id` | string | Owner user ID | | `name` | string | Folder name | | `parent_id` | integer/null | Parent folder ID | | `is_system` | boolean | Indicates if it is a system folder | | `file_count` | integer | Number of files in the folder | | `created_at` | datetime | Folder creation timestamp | | `updated_at` | datetime | Last update timestamp | | `deleted_at` | datetime/null | Soft delete timestamp | | `children` | array | List of child folders | --- ## Notes - The `children` field contains **nested subfolders**. - `parent_id = null` indicates a **root-level folder**. - Useful for building **folder tree structures** in file manager UIs. - The `file_count` field indicates how many files exist in each folder.

Response

OK
datalist of objects
successboolean