API
The Hyperflow Monitor API
Get monitor info
GET /(monitor-id)
Returns the information on the specified monitor.
Response
{
"name": "Monitor 1",
"id": "8ad4a5dc-5481-4973-aa99-e0183904528d",
"interval": 2880,
"message": null,
"alert_ping": null,
"alert_timeout": null,
"timeout": "2024-08-10T22:07:55.173Z"
}{
"status": "error",
"message": "Invalid request"
}{
"status": "error",
"message": "No match found"
}Ping monitor
GET /(monitor-id)/ping
Records the ping event.
Response
{
"status": "success",
"message": "Operation completed successfully.",
"data": {
"timeout": "2024-08-10T22:07:55.173Z"
}
}{
"status": "error",
"message": "Invalid request"
}{
"status": "error",
"message": "No match found"
} {
"status": "error",
"message": "Failed to update monitor"
}Test monitor alerting
GET /(monitor-id)/test
Performs alerting on both ping and timeout.
Response
{
"status": "success",
"message": "Test alert sent"
}{
"status": "error",
"message": "Invalid request"
}{
"status": "error",
"message": "Monitor not found"
} {
"status": "error",
"message": "Failed to send alert"
}Add monitor
POST /
Create a new monitor
Body
id
string
( optional ). If unspecified, monitor instance is assigned a UUID
name
string
Name of the monitor
interval
number
Timeout interval ( in mins )
message
string
The message to send
alert_ping
string
The alerting profile to use
alert_timeout
string
The alerting profile to use for timeout events
Example;
{
"name": "Test",
"interval": 2880,
"message": "A new booking was made",
"alert_ping": "sygnal-pushbullet",
"alert_timeout": "sygnal-pushbullet"
}Response
{
"status": "success",
"message": "Test alert sent",
"data": {
"id": "8ad4a5dc-5481-4973-aa99-e0183904528d"
}
}{
"status": "error",
"message": "Invalid request"
}{
"status": "error",
"message": "Monitor not found"
} {
"status": "error",
"message": "Failed to send alert"
}Update monitor
PATCH /(monitor-id)
Update a monitor
Body
name
string
Name of the monitor
interval
number
Timeout interval ( in mins )
message
string
The message to send
alert_ping
string
The alerting profile to use
alert_timeout
string
The alerting profile to use for timeout events
Response
{
"status": "success",
"message": "Monitor updated"
}{
"status": "error",
"message": "Invalid request"
}{
"status": "error",
"message": "Monitor not found"
} {
"status": "error",
"message": "Failed to send alert"
}Last updated