Get one alert rule
GET
/api/v1/alerts/rules/{id}
const url = 'https://example.com/api/v1/alerts/rules/1';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
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/api/v1/alerts/rules/1 \ --header 'Authorization: <Authorization>'Returns a single alert rule by ID.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Rule ID
Responses
Section titled “Responses”OK
Media typeapplication/json
object
channel_ids
Array<integer>
cooldown_minutes
integer
created_at
string
enabled
boolean
environment_id
integer
id
integer
info
string
match_field
string
match_type
string
match_value
string
name
string
node_uuid
string
source
string
status_severity
string
updated_at
string
Examplegenerated
{ "channel_ids": [ 1 ], "cooldown_minutes": 1, "created_at": "example", "enabled": true, "environment_id": 1, "id": 1, "info": "example", "match_field": "example", "match_type": "example", "match_value": "example", "name": "example", "node_uuid": "example", "source": "example", "status_severity": "example", "updated_at": "example"}Bad request
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Unauthorized
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Not found
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Alerts disabled
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}