Clear a raised alert on an agent instance
POST
/api/v1/alerts/clear
const url = 'https://app.prefactorai.com/api/v1/alerts/clear';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '"013xrzp12g3nqk8ns6jadrqmpgrjkeny"'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.prefactorai.com/api/v1/alerts/clear \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '"013xrzp12g3nqk8ns6jadrqmpgrjkeny"'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”AgentInstance_Id
A valid agent instance ID
string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyResponses
Section titled “Responses”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
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
status
Lifecycle status of the alert: ‘raised’ or ‘cleared’
string
summary
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
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
status
string
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"}default
Section titled “default”Error