Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions content/en/api/v2/monitors/examples.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"data": {
"attributes": {
"filter": {
"scope": "test:example-monitor"
},
"name": "test rule",
"recipients": [
"slack-test-channel",
"jira-test"
]
},
"type": "monitor-notification-rule"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"data": {
"attributes": {
"filter": {
"scope": "test:example-monitor"
},
"name": "updated rule",
"recipients": [
"slack-test-channel"
]
},
"id": "00000000-0000-1234-0000-000000000000",
"type": "monitor-notification-rule"
}
}
10 changes: 10 additions & 0 deletions data/api/v2/CodeExamples.json
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,11 @@
"group": "monitors",
"suffix": "_1181818787",
"description": "Create a monitor notification rule with conditional recipients returns \"OK\" response"
},
{
"group": "monitors",
"suffix": "_1379932371",
"description": "Create a monitor notification rule with scope returns \"OK\" response"
}
],
"CreateMonitorUserTemplate": [
Expand All @@ -1134,6 +1139,11 @@
"group": "monitors",
"suffix": "_1400905713",
"description": "Update a monitor notification rule with conditional_recipients returns \"OK\" response"
},
{
"group": "monitors",
"suffix": "_1446058210",
"description": "Update a monitor notification rule with scope returns \"OK\" response"
}
],
"UpdateMonitorUserTemplate": [
Expand Down
42 changes: 31 additions & 11 deletions data/api/v2/full_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32955,15 +32955,23 @@ components:
properties:
recipients:
$ref: '#/components/schemas/MonitorNotificationRuleRecipients'
description: A list of recipients to notify. Uses the same format as the
monitor `message` field. Must not start with an '@'.
scope:
$ref: '#/components/schemas/MonitorNotificationRuleScope'
$ref: '#/components/schemas/MonitorNotificationRuleConditionScope'
required:
- scope
- recipients
type: object
MonitorNotificationRuleConditionScope:
description: The scope to which the monitor applied.
example: transition_type:alert
maxLength: 3000
minLength: 1
type: string
MonitorNotificationRuleConditionalRecipients:
description: Use conditional recipients to define different recipients for different
situations.
situations. Cannot be used with `recipients`.
properties:
conditions:
description: Conditions of the notification rule.
Expand Down Expand Up @@ -33013,12 +33021,30 @@ components:
description: Filter used to associate the notification rule with monitors.
oneOf:
- $ref: '#/components/schemas/MonitorNotificationRuleFilterTags'
- $ref: '#/components/schemas/MonitorNotificationRuleFilterScope'
MonitorNotificationRuleFilterScope:
additionalProperties: false
description: Filter monitor notifications. A monitor notification must match
the scope.
properties:
scope:
description: A scope composed of one or several key:value pairs, which can
be used to filter monitor notifications on monitor and group tags.
example: service:(foo OR bar) AND team:test NOT environment:staging
maxLength: 3000
minLength: 1
type: string
required:
- scope
type: object
MonitorNotificationRuleFilterTags:
additionalProperties: false
description: Filter monitors by tags. Monitors must match all tags.
description: Filter monitor notifications by tags. A monitor notification must
match all tags.
properties:
tags:
description: A list of monitor tags.
description: A list of tags (key:value pairs), which can be used to filter
monitor notifications on monitor and group tags.
example:
- team:product
- host:abc
Expand Down Expand Up @@ -33058,7 +33084,7 @@ components:
type: string
MonitorNotificationRuleRecipients:
description: A list of recipients to notify. Uses the same format as the monitor
`message` field. Must not start with an '@'.
`message` field. Must not start with an '@'. Cannot be used with `conditional_recipients`.
example:
- slack-test-channel
- jira-test
Expand Down Expand Up @@ -33141,12 +33167,6 @@ components:
description: An object related to a monitor notification rule.
oneOf:
- $ref: '#/components/schemas/User'
MonitorNotificationRuleScope:
description: The scope to which the monitor applied.
example: transition_type:alert
maxLength: 3000
minLength: 1
type: string
MonitorNotificationRuleUpdateRequest:
description: Request for updating a monitor notification rule.
properties:
Expand Down
Loading