GET
/
alert-rules
/
{alertRuleId}
Get an alert rule
curl --request GET \
  --url https://api.phare.io/alert-rules/{alertRuleId} \
  --header 'Authorization: Bearer <token>'
{
  "id": 1,
  "event": "uptime.monitor.created",
  "project_id": 1,
  "integration_id": 1,
  "rate_limit": 5,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
Please be aware that the Phare API is currently in beta and is subject to change.

Authorizations

Authorization
string
header
required

Use a user token to access authenticated routes. The token must be specified in the Authorization HTTP header with the following format 'Authorization: Bearer <token>'.

Path Parameters

alertRuleId
integer
required

ID of the alert rule to show

Response

Success, alert rule retrieved

event
enum<string>
required

Name of the event that will trigger the execution of the alert rule

Available options:
uptime.monitor.created,
uptime.monitor.deleted,
uptime.monitor_certificate.discovered,
uptime.monitor_certificate.expiring,
uptime.incident.created,
uptime.incident.propagated,
uptime.incident.partially_recovered,
uptime.incident.recovered,
uptime.incident_comment.created,
uptime.incident_update.published
integration_id
number
required

The ID of the integration used to send a notification when the alert rule is executed

Example:

1

rate_limit
enum<number>
required

Minimum time in minutes between two executions of the alert rule, used to minimized the number of alert received.

Available options:
0,
5,
10,
30,
60,
180,
720,
1440
Example:

5

id
number
Example:

1

project_id
number | null

The ID of a project to use as a scope

Example:

1

created_at
string<date-time>

Date of creation for the entity

updated_at
string<date-time>

Date of last update for the entity