Add Silence
POST
/alerts/v1/silence/create
const url = 'http://localhost:3000/alerts/v1/silence/create';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"startDate":"2024-01-11T07:56:23Z","endDate":"2024-01-11T08:56:23Z","alertId":"c7464d32-1d8d-4eaf-9b23-1313a3ff8149","manager":"grafana"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/alerts/v1/silence/create \ --header 'Content-Type: application/json' \ --data '{ "startDate": "2024-01-11T07:56:23Z", "endDate": "2024-01-11T08:56:23Z", "alertId": "c7464d32-1d8d-4eaf-9b23-1313a3ff8149", "manager": "grafana" }'Request Body
Section titled “Request Body ” Media type application/json
object
Example
{ "startDate": "2024-01-11T07:56:23Z", "endDate": "2024-01-11T08:56:23Z", "alertId": "c7464d32-1d8d-4eaf-9b23-1313a3ff8149", "manager": "grafana"}Responses
Section titled “ Responses ”Successful response
Media type application/json