跳到主要内容

aiPromptsDeleteFolder

AiSuccessResponse aiPromptsDeleteFolder(AiPromptsDeleteFolderRequest)

DELETE /api/2.0/ai/prompts/delete-folder

Delete folder

Deletes a folder together with every prompt inside it, permanently. The ID is required and may be sent in the body or as a query parameter. Unlike deleting a prompt, this checks first: a folder that does not exist, and one that belongs to another user, both answer 404 - the two cases are deliberately indistinguishable, so a foreign folder cannot be probed. Move the prompts out with PUT api/2.0/ai/prompts/move first if they should survive.

Parameters​

NameInTypeDescriptionNotes
AiPromptsDeleteFolderRequestbodyStringThe ID of the folder to delete, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the folder and the prompts inside it are gone.AiSuccessResponse-
400The folder ID is missing.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API.AiErrorResponse-
404No prompt folder has this ID.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json