Update an alert rule
PATCH
/v1/metric-alerts/{id}
const url = 'https://shareout.site/v1/metric-alerts/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true,"schedule":"example","condition":{"op":"gt","value":1},"message":"example","cooldown_seconds":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://shareout.site/v1/metric-alerts/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "schedule": "example", "condition": { "op": "gt", "value": 1 }, "message": "example", "cooldown_seconds": 1 }'Enable/pause, change schedule, condition, message, or cooldown.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
enabled
boolean
schedule
string
condition
object
op
required
string
value
required
number
message
string
cooldown_seconds
integer
Responses
Section titled “ Responses ”Updated