cURL
curl --request PUT \
--url https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug} \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const options = {
method: 'PUT',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}"
payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"muting_rule": {
"name": "<string>",
"comment": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"label_matchers": [
{
"name": "<string>",
"type": "EXACT",
"value": "<string>"
}
],
"recurrence": {
"timezone": "<string>",
"weekly_schedule": {
"friday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"monday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"saturday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"sunday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"thursday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"tuesday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"wednesday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
}
}
},
"slug": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}UpdateMutingRule
PUT
/
api
/
v1
/
config
/
muting-rules
/
{slug}
cURL
curl --request PUT \
--url https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug} \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const options = {
method: 'PUT',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/muting-rules/{slug}"
payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"muting_rule": {
"name": "<string>",
"comment": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"label_matchers": [
{
"name": "<string>",
"type": "EXACT",
"value": "<string>"
}
],
"recurrence": {
"timezone": "<string>",
"weekly_schedule": {
"friday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"monday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"saturday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"sunday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"thursday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"tuesday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
},
"wednesday": {
"ranges": [
{
"end_hh_mm": "<string>",
"start_hh_mm": "<string>"
}
]
}
}
},
"slug": "<string>",
"starts_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}Authorizations
Cortex XCOR API token
Path Parameters
Body
application/json
If true, the MutingRule will be created if it does not already exist, identified by slug. If false, an error will be returned if the MutingRule does not already exist.
If true, validates the specified configuration without creating or updating the MutingRule. If the specified configuration is valid, the endpoint returns a partial response without the MutingRule. If the specified configuration is invalid, the endpoint returns an error.
The MutingRule to update.
Show child attributes
Show child attributes
Response
A successful response containing the updated MutingRule.
Show child attributes
Show child attributes