Create Silence
Create a new one-time silence rule to suppress monitor notifications for a specified time period, using label matchers to target specific monitors or issues.
Last updated
START=$(date -u +%Y-%m-%dT%H:%M:%SZ)
END=$(date -u -d '+7 days' +%Y-%m-%dT%H:%M:%SZ)
curl -sS -X POST 'https://app.groundcover.com/api/monitors/silences' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-H 'X-Backend-Id: <YOUR_BACKEND_ID>' \
-d "{
\"startsAt\": \"$START\",
\"endsAt\": \"$END\",
\"comment\": \"API test: team=tam, 7d\",
\"matchers\": [
{
\"name\": \"team\",
\"value\": \"tam\",
\"isRegex\": false,
\"isEqual\": true
}
]
}"{
"silenceID": "91c9683d-705b-4aea-a988-3edc8ca07060"
}