Trình giám sát thời gian hoạt động
GET https://dwandev.com/api/monitors/
curl --request GET \
--url 'https://dwandev.com/api/monitors/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dwandev.com/api/monitors/' \
--header 'Authorization: Bearer {api_key}' \
Tham số | Chi tiết | Mô tả |
---|---|---|
page | Tùy chọn Số nguyên | Số trang mà bạn muốn lấy kết quả. Mặc định là 1 . |
results_per_page | Tùy chọn Số nguyên | Số lượng kết quả bạn muốn trên mỗi trang. Giá trị cho phép là: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Mặc định là 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": "2025-04-12 05:43:52"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://dwandev.com/api/monitors?&page=1",
"last": "https://dwandev.com/api/monitors?&page=1",
"next": null,
"prev": null,
"self": "https://dwandev.com/api/monitors?&page=1"
}
}
GET https://dwandev.com/api/monitors/{monitor_id}
curl --request GET \
--url 'https://dwandev.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dwandev.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": "2025-04-12 05:43:52"
}
}
POST https://dwandev.com/api/monitors
Tham số | Chi tiết | Mô tả |
---|---|---|
name | Bắt buộc Chuỗi | - |
target | Bắt buộc Chuỗi | - |
port | Tùy chọn Chuỗi | - |
type | Tùy chọn Chuỗi | Giá trị cho phép: website , ping , port |
project_id | Tùy chọn Số nguyên | - |
ping_servers_ids | Tùy chọn Mảng | Giá trị cho phép: 1 , 13 , 14 , 24 , 27 , 28 , 31 , 32 , 33 , 34 , 35 |
check_interval_seconds | Tùy chọn Số nguyên | Giá trị cho phép: 30 , 60 , 180 , 300 , 600 , 1800 , 3600 , 21600 , 43200 , 86400 (giây) |
timeout_seconds | Tùy chọn Số nguyên | Giá trị cho phép: 1 , 2 , 3 , 5 , 10 , 25 , 60 (giây) |
request_method | Tùy chọn Chuỗi | Giá trị cho phép: HEAD , GET , POST , PUT , PATCH |
request_body | Tùy chọn Chuỗi | - |
request_basic_auth_username | Tùy chọn Chuỗi | - |
request_basic_auth_password | Tùy chọn Chuỗi | - |
request_header_name | Tùy chọn Mảng | - |
request_header_value | Tùy chọn Mảng | - |
response_status_code | Tùy chọn Số nguyên | - |
response_body | Tùy chọn Chuỗi | - |
response_header_name | Tùy chọn Chuỗi | - |
response_header_value | Tùy chọn Chuỗi | - |
is_ok_notifications | Tùy chọn Mảng | ID trình xử lý thông báo |
email_reports_is_enabled | Tùy chọn Boolean | - |
cache_buster_is_enabled | Tùy chọn Boolean | - |
verify_ssl_is_enabled | Tùy chọn Boolean | - |
is_enabled | Tùy chọn Boolean | - |
curl --request POST \
--url 'https://dwandev.com/api/monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=https://example.com/' \
--url 'https://dwandev.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://dwandev.com/api/monitors/{monitor_id}
Tham số | Chi tiết | Mô tả |
---|---|---|
name | Tùy chọn Chuỗi | - |
target | Tùy chọn Chuỗi | - |
port | Tùy chọn Chuỗi | - |
type | Tùy chọn Chuỗi | Giá trị cho phép: website , ping , port |
project_id | Tùy chọn Số nguyên | - |
ping_servers_ids | Tùy chọn Mảng | Giá trị cho phép: 1 , 13 , 14 , 24 , 27 , 28 , 31 , 32 , 33 , 34 , 35 |
check_interval_seconds | Tùy chọn Số nguyên | Giá trị cho phép: 30 , 60 , 180 , 300 , 600 , 1800 , 3600 , 21600 , 43200 , 86400 (giây) |
timeout_seconds | Tùy chọn Số nguyên | Giá trị cho phép: 1 , 2 , 3 , 5 , 10 , 25 , 60 (giây) |
request_method | Tùy chọn Chuỗi | Giá trị cho phép: HEAD , GET , POST , PUT , PATCH |
request_body | Tùy chọn Chuỗi | - |
request_basic_auth_username | Tùy chọn Chuỗi | - |
request_basic_auth_password | Tùy chọn Chuỗi | - |
request_header_name | Tùy chọn Mảng | - |
request_header_value | Tùy chọn Mảng | - |
response_status_code | Tùy chọn Số nguyên | - |
response_body | Tùy chọn Chuỗi | - |
response_header_name | Tùy chọn Chuỗi | - |
response_header_value | Tùy chọn Chuỗi | - |
is_ok_notifications | Tùy chọn Mảng | ID trình xử lý thông báo |
email_reports_is_enabled | Tùy chọn Boolean | - |
cache_buster_is_enabled | Tùy chọn Boolean | - |
verify_ssl_is_enabled | Tùy chọn Boolean | - |
is_enabled | Tùy chọn Boolean | - |
curl --request POST \
--url 'https://dwandev.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--url 'https://dwandev.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
{
"data": {
"id": 1
}
}
DELETE https://dwandev.com/api/monitors/{monitor_id}
curl --request DELETE \
--url 'https://dwandev.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dwandev.com/api/monitors/{monitor_id}' \
--header 'Authorization: Bearer {api_key}' \