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
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
| Parameter | Type | Description |
|---|---|---|
name | string | A descriptive name for the snooze/mute schedule. |
mute.time_intervals | array | A list of time intervals during which alerts should be suppressed. |
times | array | Specifies the start_time (e.g., "00:00") and duration_minutes for the mute. |
weekdays | array | Optional. Days of the week this mute applies (e.g., ["saturday", "sunday"]). |
location | string | The timezone for evaluating the time (e.g., "America/New_York", "UTC"). |
Curl Example
- Create Weekend Mute
- Create Nightly Mute
- Create Business Hours Mute
- Create Weekly Meeting Mute
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"
}
]
}
}'
curl -X POST "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups" \
-H "Content-Type: application/json" \
-d '{
"name": "Nightly Maintenance",
"mute": {
"time_intervals": [
{
"times": [
{ "start_time": "02:00", "duration_minutes": 120 }
],
"location": "UTC"
}
]
}
}'
curl -X POST "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups" \
-H "Content-Type: application/json" \
-d '{
"name": "Working Hours Mute",
"mute": {
"time_intervals": [
{
"times": [
{ "start_time": "09:00", "duration_minutes": 480 }
],
"weekdays": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"location": "America/New_York"
}
]
}
}'
curl -X POST "http://<cubeapm-admin-host>:3199/api/alerts/api/v1/mutegroups" \
-H "Content-Type: application/json" \
-d '{
"name": "Tuesday All-Hands",
"mute": {
"time_intervals": [
{
"times": [
{ "start_time": "10:00", "duration_minutes": 60 }
],
"weekdays": ["tuesday"],
"location": "America/New_York"
}
]
}
}'
Response Format
The response is a JSON object with the following structure:
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the mute group. |
name | string | The descriptive name of the snooze/mute schedule. |
mute | object | The 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:
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the mute group. |
name | string | The descriptive name of the snooze/mute schedule. |
mute | object | The 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:
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier for the mute group. |
name | string | The descriptive name of the snooze/mute schedule. |
mute | object | The 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
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
| Parameter | Type | Description |
|---|---|---|
id | integer | Unique identifier for the mute group. |
name | string | A descriptive name for the snooze/mute schedule. |
mute.time_intervals | array | A list of time intervals during which alerts should be suppressed. |
times | array | Specifies the start_time (e.g., "00:00") and duration_minutes for the mute. |
weekdays | array | Optional. Days of the week this mute applies (e.g., ["saturday", "sunday"]). |
location | string | The 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:
- Grab the
idof the created Mute Group. - Use the
PUT /api/v1/rulesendpoint from the Alert Rules API to update your specific Alert Rule, adding the new Mute Group'sidinto theconfig.mute_group_idsarray.
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]
}
}