Enable AI Prompt
Enables the specified AI prompt.
Required Permissions
Requires the MEMBER role or higher.
HTTP Request
POST /api/sonar/ai/prompts/:guid/enable
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X POST \
https://HOSTNAME/api/sonar/ai/prompts/a1b2c3d4-e5f6-7890-abcd-ef1234567890/enable
Request Parameters
Path Parameters
| Key | Type | Description | Notes |
|---|---|---|---|
| guid | String | Prompt GUID | 36 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"
}