跳到主要内容

aiPromptsGetById

AiPrompt aiPromptsGetById(id)

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

Get a saved prompt

Returns one saved prompt by its ID. The ID is required and is read from the query. An ID that is unknown, or that belongs to another user, is not reported as 404: the answer is an empty body with status 200, so treat a missing payload as no such prompt. Prompt IDs come from GET api/2.0/ai/prompts/list or from the answer of the create operation.

Parameters​

NameInTypeDescriptionNotes
idqueryStringThe saved prompt identifier.[required] [example: 33333333-3333-3333-3333-333333333333]

Responses​

Status codeDescriptionTypeResponse headers
200The prompt, or an empty body when no prompt of the caller's has that ID.AiPrompt-
400The prompt 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​

AiPrompt

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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