Remove AI prompts
Removes the specified AI prompts.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
DELETE /api/sonar/ai/prompts
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE \
"https://HOSTNAME/api/sonar/ai/prompts?guids=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guids | Yes | List (of strings) | Prompt identifier list | Comma-separated GUID list |
Success Response
{
"failures": []
}
Error Responses
Required argument is missing
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "guids should be not null"
}
Contains a value that is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "Invalid UUID string: invalid-guid"
}
The prompt deletion request failed
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "cannot remove prompts [a1b2c3d4-e5f6-7890-abcd-ef1234567890]"
}