Monitors

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint:

GET
https://phpuptime.lunatio.com/api/v1/monitors

Request example:

curl --location --request GET 'https://phpuptime.lunatio.com/api/v1/monitors' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Description
search
optional string
The search query.
search_by
optional string
Search by. Possible values are: name for Name, url for URL. Defaults to: name.
status_page_id
optional integer
Status page ID.
sort_by
optional string
Sort by. Possible values are: id for Date created, name for Name, url for URL. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional integer
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Show

API endpoint:

GET
https://phpuptime.lunatio.com/api/v1/monitors/{id}

Request example:

curl --location --request GET 'https://phpuptime.lunatio.com/api/v1/monitors/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
https://phpuptime.lunatio.com/api/v1/monitors

Request example:

curl --location --request POST 'https://phpuptime.lunatio.com/api/v1/monitors' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'url={url}'
Parameter
Type
Description
name
required string
Name.
url
required string
URL.
interval
required integer
Interval. Possible values are: 60, 180, 300, 600, 900, 1800, 3600.
ssl_alert_days
optional integer
The number of days before SSL certificate expiration to receive an alert. Possible values are: 0, 1, 2, 3, 7, 14, 30, 60.
maintenance_start_at
optional string
Maintenance starting date in Y-m-d H:i format.
maintenance_end_at
optional string
Maintenance ending date in Y-m-d H:i format.
alerts[index][key]
optional string
Alert. Possible values are: email for Email, webhook for Webhook, slack for Slack, teams for Microsoft Teams, discord for Discord, flock for Flock, sms for SMS.
alerts[index][value]
optional string
Value of the alert.
Update

API endpoint:

PUT PATCH
https://phpuptime.lunatio.com/api/v1/monitors/{id}

Request example:

curl --location --request PUT 'https://phpuptime.lunatio.com/api/v1/monitors/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'
Parameter
Type
Description
name
optional string
Name.
url
optional string
URL.
interval
optional integer
Interval. Possible values are: 60, 180, 300, 600, 900, 1800, 3600.
ssl_alert_days
optional integer
The number of days before SSL certificate expiration to receive an alert. Possible values are: 0, 1, 2, 3, 7, 14, 30, 60.
maintenance_start_at
optional string
Maintenance starting date in Y-m-d H:i format.
maintenance_end_at
optional string
Maintenance ending date in Y-m-d H:i format.
alerts[index][key]
optional string
Alert. Possible values are: email for Email, webhook for Webhook, slack for Slack, teams for Microsoft Teams, discord for Discord, flock for Flock, sms for SMS.
alerts[index][value]
optional string
Value of the alert.
paused
optional boolean
Paused.
Delete

API endpoint:

DELETE
https://phpuptime.lunatio.com/api/v1/monitors/{id}

Request example:

curl --location --request DELETE 'https://phpuptime.lunatio.com/api/v1/monitors/{id}' \
--header 'Authorization: Bearer {api_key}'