Enable or disable an alert rule
PUT
/v1/alerts/{id}/enabled
const url = 'https://api.monita.ai/v1/alerts/example/enabled';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.monita.ai/v1/alerts/example/enabled \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
enabled
required
boolean
Examplegenerated
{ "enabled": true}Responses
Section titled “Responses”Updated
Media typeapplication/json
object
ok
required
boolean
Examplegenerated
{ "ok": true}Not found
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}