Disable AI Prompt

Disables the specified AI prompt.

Required Permissions

Requires the MEMBER role or higher.

HTTP Request

POST /api/sonar/ai/prompts/:guid/disable
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -X POST \
     https://HOSTNAME/api/sonar/ai/prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/disable
Request Parameters
Path Parameters
KeyTypeDescriptionNotes
guidStringPrompt GUID36 characters

Success Response

{}

Error Responses

guid is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "guid should be not null"
}
guid is not a valid GUID

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
Prompt does not exist

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "prompt not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}