Retrieve a notification rule
GET
/v1/notificationrule/{id}/
const url = 'https://example.com/v1/notificationrule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/notificationrule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \ --header 'Authorization: Bearer <token>'Return a single notification rule by its ID.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
A UUID string identifying this notification rule.
Responses
Section titled “Responses”Media typeapplication/json
A ModelSerializer that takes an additional fields argument that
controls which fields should be displayed.
object
agent
string format: uuid
agent_offline
boolean
agent_tag
string
contacts_groups
Array<string>
created_at
required
string format: date-time
created_by
required
string format: uuid
custom_grace_period
Custom grace period in seconds
integer
enabled
boolean
id
required
string format: uuid
metric_item
string
metric_label
string
metric_labels_text
string
metric_display_name
required
string
modified_at
required
string format: date-time
modified_by
required
string format: uuid
name
string
recording_rule
string format: uuid
repeatable_delay
Delay in minutes to repeat notification
integer
server_group
string format: uuid
targets
Array<string>
on_call_schedules
Array<string>
Examplegenerated
{ "agent": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "agent_offline": true, "agent_tag": "example", "contacts_groups": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "custom_grace_period": 1, "enabled": true, "metric_item": "example", "metric_label": "example", "metric_labels_text": "example", "name": "example", "recording_rule": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "repeatable_delay": 1, "server_group": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "targets": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "on_call_schedules": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}