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
| Header | Type | Value | Required |
Authorization | String | Bearer {api_key} | Yes |
Accept | String | application/json | Yes |
Query Parameters
| Parameter | Type | Mode | Description |
search | String | optional | The search query. |
search_by | String | optional | Search by. Possible values are: monitor for Monitor, cause for Cause. Defaults to: url. |
monitor_id | String | optional | Monitor ID. |
status | String | optional | Status. Possible values are: unresolved for Unresolved, acknowledged for Acknowledged, resolved for Resolved. |
sort_by | String | optional | Sort by. Possible values are: started_at for Date started, ended_at for Date ended. Defaults to: ended_at. |
sort | String | optional | Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc. |
per_page | Integer | optional | Results 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
| Parameter | Type | Mode | Description |
monitor_id | Integer | Required | Monitor ID. |
started_at | String | Required | Started at date in Y-m-dTH:i:s format. |
acknowledged_at | String | optional | Acknowledged at date in Y-m-dTH:i:s format. |
ended_at | String | optional | Ended at date in Y-m-dTH:i:s format. |
cause | String | optional | Cause. |
comment | String | optional | Comment. |
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
| Parameter | Type | Mode | Description |
acknowledged_at | String | optional | Acknowledged at date in Y-m-dTH:i:s format. |
ended_at | String | optional | Ended at date in Y-m-dTH:i:s format. |
cause | String | optional | Cause. |
comment | String | optional | Comment. |
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}'