Expire an Alertmanager silence
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences/{silence_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences/{silence_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences/{silence_id} \
--header 'Authorization: Bearer <token>'{
"silence_id": "<string>",
"expired": true,
"alertmanager": {
"namespace": "<string>",
"service": "<string>",
"port": 123
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}Alerts
Expire an Alertmanager silence
Expires one silence on the cluster’s in-cluster Alertmanager, so the alerts it muted notify again. Alertmanager keeps the expired silence for its retention period. Requires alerts.write at the cluster, like the assistant’s expire_alertmanager_silence tool.
DELETE
/
api
/
v1
/
clusters
/
{cluster_id}
/
alertmanager
/
silences
/
{silence_id}
Expire an Alertmanager silence
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences/{silence_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences/{silence_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/alertmanager/silences/{silence_id} \
--header 'Authorization: Bearer <token>'{
"silence_id": "<string>",
"expired": true,
"alertmanager": {
"namespace": "<string>",
"service": "<string>",
"port": 123
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}{
"detail": "<string>",
"error_code": "ALERTMANAGER_NOT_FOUND",
"retry_after": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The Alertmanager silence id, as the listing returns it.
Query Parameters
Namespace of the Alertmanager Service. Alone it narrows discovery to that namespace; with service it skips discovery.
Name of the Alertmanager Service, for installs discovery does not find. Needs namespace.
Port Alertmanager listens on.
Required range:
1 <= x <= 65535