Skip to main content

Mute Groups

Mute groups allow you to suppress notifications for specific time intervals.

Authentication​

These APIs can be accessed programmatically using the Admin Port 3199.

Headers Required:

  • (Optional) Authorization: Bearer <ADMIN_TOKEN>
  • Content-Type: application/json
info

When http-token-admin is enabled in CubeAPM's config.properties, requests must include the corresponding token in the Authorization header when using curl to CREATE, UPDATE, or DELETE mute groups.

Create Mute Group​

Endpoint: POST http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups

Request Parameters​

ParameterTypeDescription
namestringA descriptive name for the snooze/mute schedule.
mute.time_intervalsarrayA list of time intervals during which alerts should be suppressed.
timesarraySpecifies the start_time (e.g., "00:00") and duration_minutes for the mute.
weekdaysarrayOptional. Days of the week this mute applies (e.g., ["saturday", "sunday"]).
locationstringThe timezone for evaluating the time (e.g., "America/New_York", "UTC").

Curl Example​

curl -X POST "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekend Silence",
"mute": {
"time_intervals": [
{
"times": [
{ "start_time": "00:00", "duration_minutes": 1440 }
],
"weekdays": ["saturday", "sunday"],
"location": "America/New_York"
}
]
}
}'

Response Format​

The response is a JSON object with the following structure:

FieldTypeDescription
idintegerUnique identifier for the mute group.
namestringThe descriptive name of the snooze/mute schedule.
muteobjectThe saved configuration for the time intervals.

For example:

{
"id": 1,
"name": "Weekend Silence",
"mute": {
"time_intervals": [
{
"times": [
{
"start_time": "00:00",
"duration_minutes": 1440
}
],
"weekdays": [
"saturday",
"sunday"
],
"location": "America/New_York"
}
]
}
}

Fetch All Mute Groups​

Endpoint: GET http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups

Curl Example​

curl -X GET "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups"

Response Format​

The response is a JSON array containing mute group objects. Each object has the following structure:

FieldTypeDescription
idintegerUnique identifier for the mute group.
namestringThe descriptive name of the snooze/mute schedule.
muteobjectThe saved configuration for the time intervals.

For example:

[
{
"id": 1,
"name": "Weekend Silence",
"mute": {
"time_intervals": [
{
"times": [
{
"start_time": "00:00",
"duration_minutes": 1440
}
],
"weekdays": [
"saturday",
"sunday"
],
"location": "America/New_York"
}
]
}
}
]

Fetch Specific Mute Group​

Endpoint: GET http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups

Curl Example​

curl -X GET "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups?id=1"

Response Format​

The response is a JSON object representing the specific mute group, with the following structure:

FieldTypeDescription
idintegerUnique identifier for the mute group.
namestringThe descriptive name of the snooze/mute schedule.
muteobjectThe saved configuration for the time intervals.

For example:

{
"id": 1,
"name": "Weekend Silence",
"mute": {
"time_intervals": [
{
"times": [
{
"start_time": "00:00",
"duration_minutes": 1440
}
],
"weekdays": [
"saturday",
"sunday"
],
"location": "America/New_York"
}
]
}
}

Update / Delete Mute Groups​

warning

The PUT request replaces the entire Mute Group configuration. You must include all existing configurations (such as the mute settings) in your payload; otherwise, they will be overwritten and removed!

Update a Mute Group (PUT)​

Endpoint: PUT http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups

Request Parameters​

ParameterTypeDescription
idintegerUnique identifier for the mute group.
namestringA descriptive name for the snooze/mute schedule.
mute.time_intervalsarrayA list of time intervals during which alerts should be suppressed.
timesarraySpecifies the start_time (e.g., "00:00") and duration_minutes for the mute.
weekdaysarrayOptional. Days of the week this mute applies (e.g., ["saturday", "sunday"]).
locationstringThe timezone for evaluating the time (e.g., "America/New_York", "UTC").

For example:

curl -X PUT "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups" \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"name": "Updated Mute Name",
"mute": {
"time_intervals": [
{
"times": [
{ "start_time": "00:00", "duration_minutes": 720 }
],
"weekdays": ["sunday"],
"location": "UTC"
}
]
}
}'

Delete a Mute Group (DELETE)​

Endpoint: DELETE http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups?id=1

curl -X DELETE "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups?id=1"

How to Mute an Existing Alert Rule​

Once you have created a Mute Group, you can use it to mute an alert for the specific schedule you defined. To apply the mute:

  1. Grab the id of the created Mute Group.
  2. Use the PUT /api/v1/rules endpoint from the Alert Rules API to update your specific Alert Rule, adding the new Mute Group's id into the config.mute_group_ids array.
warning

The PUT request replaces the entire rule configuration. You must include all existing configurations (such as labels, inline receiver, inline mute, and permissions) in your payload; otherwise, they will be overwritten and removed!

Add your Mute Group's id into config.mute_group_ids, keeping every other existing field of the rule intact:

{
"id": 1,
"name": "High CPU Usage",
"status": "ACTIVE",
"config": {
"receiver_group_ids": [3],
"mute_group_ids": [1]
}
}