跳到主要内容

aiPromptsGetFolderById

AiPromptFolder aiPromptsGetFolderById(id)

GET /api/2.0/ai/prompts/get-folder-by-id

Get a prompt folder

Returns one folder of the caller's prompt library by its ID, without the prompts inside it. The ID is required and is read from the query. An unknown or foreign ID is not reported as 404: the answer is an empty body with status 200. This differs from the delete operation on the same ID, which does answer 404.

Parameters​

NameInTypeDescriptionNotes
idqueryStringThe prompt folder identifier.[required] [example: 44444444-4444-4444-4444-444444444444]

Responses​

Status codeDescriptionTypeResponse headers
200The folder, or an empty body when no folder of the caller's has that ID.AiPromptFolder-
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-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiPromptFolder

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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