Skip to Content
Docs

GET /api/folders

GET
/api/folders

The folder tree of the workspace the request names (header X-DocsGPT-Workspace, default Personal), oldest first: {folders: [Folder], workspace}. In a team it is the team's one tree, the same for every member. counts, item_count and folder_count count direct children; used_by names the agents reading a folder's sources live. 404 workspace_not_found for a team the caller isn't in.

Personal access token scope: agents:read or prompts:read or sources:read or tools:read.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Query Parameters

type?string

agent, source, tool or prompt (optional): the kind item_count counts

Response Body

Success

Example Request
curl -X GET 'http://localhost:7091/api/folders'
Example Response200
Empty