Uptime-övervakare
GET https://uptime4.com/api/monitors/
curl --request GET \
--url 'https://uptime4.com/api/monitors/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/monitors/' \
--header 'Authorization: Bearer {api_key}' \
| Parametrar | Detaljer | Beskrivning |
|---|---|---|
| search | Valfritt Sträng | Söksträngen. |
| search_by | Valfritt Sträng | Vilket fält söker du efter? Tillåtna värden är: name, target. |
| is_enabled | Valfritt Boolean | |
| type | Valfritt Sträng | Tillåtna värden: website, ping, port |
| ping_servers_ids | Valfritt Heltal | Tillåtna värden: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 |
| project_id | Valfritt Heltal | |
| datetime_field | Valfritt Sträng | Tillåtna värden: datetime, last_datetime, last_check_datetime |
| datetime_start | Valfritt Sträng | Filter results starting from this datetime. Y-m-d H:i:s format. |
| datetime_end | Valfritt Sträng | Filter results up to this datetime. Y-m-d H:i:s format. |
| order_by | Valfritt Sträng | Vilket fält att sortera resultaten efter. Tillåtna värden är: monitor_id, datetime, last_datetime, last_check_datetime, name, uptime, average_response_time. |
| order_type | Valfritt Sträng | Ordningen av resultaten. Tillåtna värden är: ASC för stigande ordning, och DESC för fallande ordning. |
| page | Valfritt Heltal | Sidanummeret som du vill ha resultat från. Standardinställning är 1. |
| results_per_page | Valfritt Heltal | Hur många resultat vill du ha per sida. Tillåtna värden är: 10, 25, 50, 100, 250, 500, 1000. Standardvärde är 25. |
{
"data": [
{
"id": 1,
"project_id": 0,
"name": "Example",
"type": "website",
"target": "https://example.com/",
"port": 0,
"settings": {
"check_interval_seconds": 3600,
"timeout_seconds": 1,
"request_method": "GET",
"request_body": "",
"request_basic_auth_username": "",
"request_basic_auth_password": "",
"request_headers": [],
"response_status_code": 200,
"response_body": "",
"response_headers": []
},
"ping_servers_ids": [1],
"is_ok": 1,
"uptime": 95.5,
"downtime": 4.5,
"average_response_time": 500,
"total_checks": 500,
"total_ok_checks": 450,
"total_not_ok_checks": 50,
"last_check_datetime": "2021-03-25 08:27:07",
"notifications": {
"email_is_enabled": 0,
"webhook":"",
"slack":"",
"twilio":""
},
"is_enabled": false,
"datetime": "2026-04-29 02:24:59",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://uptime4.com/api/monitors?page=1",
"last": "https://uptime4.com/api/monitors?page=1",
"next": null,
"prev": null,
"self": "https://uptime4.com/api/monitors?page=1"
}
}
GET https://uptime4.com/api/monitors/{monitor_id}
curl --request GET \
--url 'https://uptime4.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": 0,
"name": "Example",
"type": "website",
"target": "https://example.com/",
"port": 0,
"settings": {
"check_interval_seconds": 3600,
"timeout_seconds": 1,
"request_method": "GET",
"request_body": "",
"request_basic_auth_username": "",
"request_basic_auth_password": "",
"request_headers": [],
"response_status_code": 200,
"response_body": "",
"response_headers": []
},
"ping_servers_ids": [1],
"is_ok": 1,
"uptime": 95.5,
"downtime": 4.5,
"average_response_time": 500,
"total_checks": 500,
"total_ok_checks": 450,
"total_not_ok_checks": 50,
"last_check_datetime": "2021-03-25 08:27:07",
"notifications": {
"email_is_enabled": 0,
"webhook":"",
"slack":"",
"twilio":""
},
"is_enabled": false,
"datetime": "2026-04-29 02:24:59",
}
}
POST https://uptime4.com/api/monitors
| Parametrar | Detaljer | Beskrivning |
|---|---|---|
| name | Obligatoriskt Sträng | - |
| target | Obligatoriskt Sträng | - |
| port | Valfritt Sträng | - |
| type | Valfritt Sträng | Tillåtna värden: website, ping, port |
| project_id | Valfritt Heltal | - |
| ping_servers_ids | Valfritt Array | Tillåtna värden: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 |
| check_interval_seconds | Valfritt Heltal | Tillåtna värden: 60, 180, 300, 600, 1800, 3600, 21600, 43200, 86400 (sekunder) |
| timeout_seconds | Valfritt Heltal | Tillåtna värden: 1, 2, 3, 5, 10, 25 (sekunder) |
| ping_ipv | Valfritt Sträng |
Tillgänglig när: type = ping Tillåtna värden: ipv4, ipv6 |
| request_method | Valfritt Sträng | Tillåtna värden: HEAD, GET, POST, PUT, PATCH |
| request_body | Valfritt Sträng | - |
| request_basic_auth_username | Valfritt Sträng | - |
| request_basic_auth_password | Valfritt Sträng | - |
| request_header_name | Valfritt Array | - |
| request_header_value | Valfritt Array | - |
| response_status_code | Valfritt Heltal | - |
| response_body | Valfritt Sträng | - |
| response_header_name | Valfritt Sträng | - |
| response_header_value | Valfritt Sträng | - |
| is_ok_notifications | Valfritt Array | Notifikationshanterar-id:n |
| email_reports_is_enabled | Valfritt Boolean | - |
| cache_buster_is_enabled | Valfritt Boolean | - |
| verify_ssl_is_enabled | Valfritt Boolean | - |
| is_enabled | Valfritt Boolean | - |
curl --request POST \
--url 'https://uptime4.com/api/monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=https://example.com/' \
--url 'https://uptime4.com/api/monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=https://example.com/' \
{
"data": {
"id": 1
}
}
POST https://uptime4.com/api/monitors/{monitor_id}
| Parametrar | Detaljer | Beskrivning |
|---|---|---|
| name | Valfritt Sträng | - |
| target | Valfritt Sträng | - |
| port | Valfritt Sträng | - |
| type | Valfritt Sträng | Tillåtna värden: website, ping, port |
| project_id | Valfritt Heltal | - |
| ping_servers_ids | Valfritt Array | Tillåtna värden: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 |
| check_interval_seconds | Valfritt Heltal | Tillåtna värden: 60, 180, 300, 600, 1800, 3600, 21600, 43200, 86400 (sekunder) |
| timeout_seconds | Valfritt Heltal | Tillåtna värden: 1, 2, 3, 5, 10, 25 (sekunder) |
| ping_ipv | Valfritt Sträng |
Tillgänglig när: type = ping Tillåtna värden: ipv4, ipv6 |
| request_method | Valfritt Sträng | Tillåtna värden: HEAD, GET, POST, PUT, PATCH |
| request_body | Valfritt Sträng | - |
| request_basic_auth_username | Valfritt Sträng | - |
| request_basic_auth_password | Valfritt Sträng | - |
| request_header_name | Valfritt Array | - |
| request_header_value | Valfritt Array | - |
| response_status_code | Valfritt Heltal | - |
| response_body | Valfritt Sträng | - |
| response_header_name | Valfritt Sträng | - |
| response_header_value | Valfritt Sträng | - |
| is_ok_notifications | Valfritt Array | Notifikationshanterar-id:n |
| email_reports_is_enabled | Valfritt Boolean | - |
| cache_buster_is_enabled | Valfritt Boolean | - |
| verify_ssl_is_enabled | Valfritt Boolean | - |
| is_enabled | Valfritt Boolean | - |
curl --request POST \
--url 'https://uptime4.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--url 'https://uptime4.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
{
"data": {
"id": 1
}
}
DELETE https://uptime4.com/api/monitors/{monitor_id}
curl --request DELETE \
--url 'https://uptime4.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \