Delete a folder
Delete a folder. Its folders and items move to its parent (the top level and unfiled when it had none); a child folder whose name is taken there gets a " (n)" suffix; agents reading it live lose it. A team's folder needs the Editor role there. Answers {success, moved_items, moved_folders, renamed: [{id, from, to}]}.
Personal access token scope: agents:write or prompts:write or sources:write or tools:write.
bearerAuthorizationBearer <token>A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).
folder_id*stringSuccess
curl -X DELETE 'http://localhost:7091/api/folders/string'Ask a running draft turn to stop POST
Stop the caller's draft turn: it makes no further model calls and its stream ends with end. The id is the turn_id the stream request sent, or the stream's first event (turn). A stop that arrives before the turn has started stops it as soon as it does. The stop is kept under the caller's name, so it never reaches another user's turn. Answers 202 once the request is stored, whether or not the caller has such a turn. Args: turn_id: The id the stream request sent, or the one its `turn` event carried. Returns: 202 when the stop was stored, 404 for a malformed id, 503 without Redis. Not available to [personal access tokens](/API/personal-access-tokens); call it from a signed-in session.
GET /api/folders GET
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](/API/personal-access-tokens) scope: `agents:read` or `prompts:read` or `sources:read` or `tools:read`.