AlertRoutes
Update an alert route
Updates an alert route. Note: This endpoint requires access to Advanced Alert Routing. If you’re unsure whether you have access to this feature, please contact Rootly customer support.
PATCH
/
v1
/
alert_routes
/
{id}
Update an alert route
curl --request PATCH \
--url https://api.rootly.com/v1/alert_routes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "alert_routes",
"attributes": {
"name": "<string>",
"enabled": true,
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"name": "<string>",
"position": 123,
"fallback_rule": false,
"destinations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"condition_groups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"position": 123,
"conditions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"property_field_name": "<string>",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
]
}
]
}
}
}
'{
"data": {
"id": "<string>",
"type": "alert_routes",
"attributes": {
"name": "<string>",
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"name": "<string>",
"destinations": [
{
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"condition_groups": [
{
"conditions": [
{
"property_field_name": "<string>",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"position": 123
}
],
"position": 123,
"fallback_rule": false
}
]
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/vnd.api+json
Show child attributes
Show child attributes
Response
delete existing rule by id with _destroy
Show child attributes
Show child attributes
Was this page helpful?
Previous
List alert routing rulesList alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, please contact Rootly customer support.**
Next
⌘I
Update an alert route
curl --request PATCH \
--url https://api.rootly.com/v1/alert_routes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "alert_routes",
"attributes": {
"name": "<string>",
"enabled": true,
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"name": "<string>",
"position": 123,
"fallback_rule": false,
"destinations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"condition_groups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"position": 123,
"conditions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"_destroy": true,
"property_field_name": "<string>",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
]
}
]
}
}
}
'{
"data": {
"id": "<string>",
"type": "alert_routes",
"attributes": {
"name": "<string>",
"alerts_source_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"enabled": true,
"owning_team_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rules": [
{
"name": "<string>",
"destinations": [
{
"target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"condition_groups": [
{
"conditions": [
{
"property_field_name": "<string>",
"property_field_value": "<string>",
"property_field_values": [
"<string>"
],
"alert_urgency_ids": [
"<string>"
],
"conditionable_type": "AlertField",
"conditionable_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"position": 123
}
],
"position": 123,
"fallback_rule": false
}
]
}
}
}