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

Request using cURL

curl -H "Authorization: Bearer <API_KEY>" \
     -X POST https://HOSTNAME/api/sonar/scheduled-queries/:guid/enable

Request Parameter

KeyRequiredTypeDescriptionNote
guidOStringScheduled query GUID36 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"
}