The Incidents API provides endpoints to programmatically track, create, update, and resolve service outages or interruptions.


1. List All Incidents

Retrieves a list of incidents associated with your monitors.

HTTP Request

HTTP
GET https://veyon.app/api/v1/incidents

Request Headers

HeaderTypeValueRequired
AuthorizationStringBearer {api_key}Yes
AcceptStringapplication/jsonYes

Query Parameters

ParameterTypeModeDescription
searchStringoptionalThe search query.
search_byStringoptionalSearch by. Possible values are: monitor for Monitor, cause for Cause. Defaults to: url.
monitor_idStringoptionalMonitor ID.
statusStringoptionalStatus. Possible values are: unresolved for Unresolved, acknowledged for Acknowledged, resolved for Resolved.
sort_byStringoptionalSort by. Possible values are: started_at for Date started, ended_at for Date ended. Defaults to: ended_at.
sortStringoptionalSort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_pageIntegeroptionalResults per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.

Request Example (cURL)

Bash
curl --location --request GET 'https://veyon.app/api/v1/incidents' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {api_key}'

2. Show a Specific Incident

Retrieves the details of a specific incident using its unique ID.

HTTP Request

HTTP
GET https://veyon.app/api/v1/incidents/{id}

Request Example (cURL)

Bash
curl --location --request GET 'https://veyon.app/api/v1/incidents/{id}' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {api_key}'

3. Store (Create) an Incident

Manually creates a new incident for a specific monitor.

HTTP Request

HTTP
POST https://veyon.app/api/v1/incidents

Request Parameters

ParameterTypeModeDescription
monitor_idIntegerRequiredMonitor ID.
started_atStringRequiredStarted at date in Y-m-dTH:i:s format.
acknowledged_atStringoptionalAcknowledged at date in Y-m-dTH:i:s format.
ended_atStringoptionalEnded at date in Y-m-dTH:i:s format.
causeStringoptionalCause.
commentStringoptionalComment.

Request Example (cURL)

Bash
curl --location --request POST 'https://veyon.app/api/v1/incidents' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Authorization: Bearer {api_key}' \
  --data-urlencode 'monitor_id={monitor_id}' \
  --data-urlencode 'started_at={started_at}'

4. Update an Incident

Updates an existing incident to mark it as acknowledged, resolved, or to update the cause and comments.

HTTP Request

HTTP
PUT https://veyon.app/api/v1/incidents/{id}
PATCH https://veyon.app/api/v1/incidents/{id}

Request Parameters

ParameterTypeModeDescription
acknowledged_atStringoptionalAcknowledged at date in Y-m-dTH:i:s format.
ended_atStringoptionalEnded at date in Y-m-dTH:i:s format.
causeStringoptionalCause.
commentStringoptionalComment.

Request Example (cURL)

Bash
curl --location --request PUT 'https://veyon.app/api/v1/incidents/{id}' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Authorization: Bearer {api_key}'

5. Delete an Incident

Permanently removes an incident record from your account.

HTTP Request

HTTP
DELETE https://veyon.app/api/v1/incidents/{id}

Request Example (cURL)

Bash
curl --location --request DELETE 'https://veyon.app/api/v1/incidents/{id}' \
  --header 'Authorization: Bearer {api_key}'