Create or update alertmanager route at index API Reference
PUT
/tenants/{tenant}/alertmanager/routes/{id}
const url = 'https://api.kupe.cloud/api/v1/tenants/acme/alertmanager/routes/0';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"active_time_intervals":["example"],"continue":false,"group_by":["alertname","cluster"],"group_interval":"5m","group_wait":"30s","match":{"additionalProperty":"example"},"match_re":{"additionalProperty":"example"},"matchers":["severity=\"critical\""],"mute_time_intervals":["example"],"receiver":"slack","repeat_interval":"4h"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.kupe.cloud/api/v1/tenants/acme/alertmanager/routes/0 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "active_time_intervals": [ "example" ], "continue": false, "group_by": [ "alertname", "cluster" ], "group_interval": "5m", "group_wait": "30s", "match": { "additionalProperty": "example" }, "match_re": { "additionalProperty": "example" }, "matchers": [ "severity=\"critical\"" ], "mute_time_intervals": [ "example" ], "receiver": "slack", "repeat_interval": "4h" }'Inserts or replaces the child route at the specified index on the root route. Indexes are 0-based and stable within a single Read+Write cycle. To append, pass an index equal to the current count returned by GET /routes.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” tenant
required
string
Tenant name
id
required
integer
Route index (0-based)
Header Parameters
Section titled “ Header Parameters ” If-Match
string
Wrapper ETag
Request Body
Section titled “ Request Body ”Route configuration
Media type application/json
object
active_time_intervals
Array<string>
continue
boolean
Example
false group_by
Array<string>
Example
[ "alertname", "cluster"] group_interval
string
Example
5m group_wait
string
Example
30s match
object
key
additional properties
string
match_re
object
key
additional properties
string
matchers
Array<string>
Example
[ "severity=\"critical\""] mute_time_intervals
Array<string>
receiver
string
Example
slack repeat_interval
string
Example
4hResponses
Section titled “ Responses ”Route after upsert
Media type application/json
object
active_time_intervals
Array<string>
continue
boolean
group_by
Array<string>
group_interval
string
group_wait
string
match
object
key
additional properties
string
match_re
object
key
additional properties
string
matchers
Array<string>
mute_time_intervals
Array<string>
receiver
string
repeat_interval
string
Example
{ "continue": false, "group_by": [ "alertname", "cluster" ], "group_interval": "5m", "group_wait": "30s", "matchers": [ "severity=\"critical\"" ], "receiver": "slack", "repeat_interval": "4h"}Validation error or out-of-range index
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}