Enable Scheduled Query
Enables a specified scheduled query. Administrator privileges are required to call this API.
HTTP Request
POST /api/sonar/scheduled-queries/:guid/enable
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X POST https://HOSTNAME/api/sonar/scheduled-queries/:guid/enable
Request Parameter
Path Parameters
| Key | Type | Description | Note |
|---|---|---|---|
| guid | String | Scheduled query GUID | 36 characters |
Success Response
{}
Error Responses
Identifier is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}
GUID is not found
HTTP status code 200
{
"result": false,
"error_msg": "scheduled query not found : 0fb16aff-dbc1-458a-9769-342de5cf9219"
}
No administrator privileges
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}