Skip to content

Fetch alert

GET
/api/v1/alerts/{alert_id}
curl --request GET \
--url https://app.prefactorai.com/api/v1/alerts/013xrzp12g3nqk8ns6jadrqmpgrjkeny \
--header 'Authorization: Bearer <token>'
alert_id
required
Alert_Id

A valid alert ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
idempotency_key
One of:

Optional idempotency key for ensuring request idempotency

string

Success

Media typeapplication/json
object
details
Alert_Details
object
account_id
Account_Id

A valid account ID

string
agent_id
Agent_Id

A valid agent ID

string
agent_instance_id
AgentInstance_Id

A valid agent instance ID

string
cleared_at
One of:

When the alert was cleared (null while raised)

string format: date-time
environment_id
Environment_Id

A valid environment ID

string
id
Alert_Id

A valid alert ID

string
inserted_at

When the alert row was created

string format: date-time
name

Name of the alert (key in the agent schema version alert_schemas)

string
payload

Alert payload data (arbitrary JSON object)

object
key
additional properties
any
payload_sensitive_encoding

When true, payload should be interpreted as containing sensitive markers as per the specification

boolean
raised_at

When the alert was raised

string format: date-time
severity

Severity of the alert

string
Allowed values: critical error warning info
status

Lifecycle status of the alert: ‘raised’ or ‘cleared’

string
Allowed values: raised cleared
summary
One of:

Short display text for the alert, rendered from the alert schema template (null when the schema has no template).

string
title

Human-readable title from the alert schema (defaults to name when the schema has no title)

string
type

Type of resource (always ‘alert’)

string
Allowed values: alert
updated_at

When the alert row was last updated

string format: date-time
version

Monotonic version of this alert row. Starts at 1 and increments on each real update.

integer
>= 1
status
string
Allowed values: success
Example
{
"details": {
"account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"agent_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"agent_instance_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"cleared_at": "2024-01-01T00:00:00Z",
"environment_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"inserted_at": "2024-01-01T00:00:00Z",
"name": "high_error_rate",
"raised_at": "2024-01-01T00:00:00Z",
"severity": "critical",
"status": "raised",
"summary": "Error rate exceeded threshold",
"title": "High error rate",
"type": "alert",
"updated_at": "2024-01-01T00:00:00Z",
"version": 1
},
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used
message
string
status
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}