Giám sát

Ghi chú
Cấp độ chuyên gia
Khóa API nên được gửi dưới dạng Bearer token trong header Authorization của yêu cầu. Lấy khóa API của bạn.
Danh sách

Điểm cuối API:

GET
https://uptime247.vn/api/v1/monitors

Ví dụ yêu cầu:

curl --location --request GET 'https://uptime247.vn/api/v1/monitors' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Tham số
Loại
Mô tả
search
tùy chọn string
Truy vấn tìm kiếm.
search_by
tùy chọn string
Tìm kiếm theo. Giá trị có thể là: name cho Tên, url cho URL. Mặc định là: name.
status_page_id
tùy chọn integer
ID trang trạng thái.
sort_by
tùy chọn string
Sắp xếp theo. Giá trị có thể là: id cho Ngày tạo, name cho Tên, url cho URL. Mặc định là: id.
sort
tùy chọn string
Sắp xếp. Giá trị có thể là: desc cho Giảm dần, asc cho Tăng dần. Mặc định là: desc.
per_page
tùy chọn integer
Kết quả mỗi trang. Giá trị có thể là: 10, 25, 50, 100. Mặc định là: 10.
Hiển thị

Điểm cuối API:

GET
https://uptime247.vn/api/v1/monitors/{id}

Ví dụ yêu cầu:

curl --location --request GET 'https://uptime247.vn/api/v1/monitors/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Lưu trữ

Điểm cuối API:

POST
https://uptime247.vn/api/v1/monitors

Ví dụ yêu cầu:

curl --location --request POST 'https://uptime247.vn/api/v1/monitors' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}' \
--data-urlencode 'url={url}'
Tham số
Loại
Mô tả
name
bắt buộc string
Tên.
url
bắt buộc string
URL.
interval
bắt buộc integer
Khoảng thời gian. Giá trị có thể là: 60, 180, 300, 600, 900, 1800, 3600.
ssl_alert_days
tùy chọn integer
Số ngày trước khi chứng chỉ SSL hết hạn để nhận cảnh báo. Giá trị có thể là: 0, 1, 2, 3, 7, 14, 30, 60.
maintenance_start_at
tùy chọn string
Ngày bắt đầu bảo trì theo định dạng Y-m-d H:i.
maintenance_end_at
tùy chọn string
Ngày kết thúc bảo trì theo định dạng Y-m-d H:i.
alerts[index][key]
tùy chọn string
Cảnh báo. Giá trị có thể là: email cho Email, webhook cho Webhook, slack cho Slack, teams cho Microsoft Teams, discord cho Discord, flock cho Flock, sms cho SMS.
alerts[index][value]
tùy chọn string
Giá trị cảnh báo.
Cập nhật

Điểm cuối API:

PUT PATCH
https://uptime247.vn/api/v1/monitors/{id}

Ví dụ yêu cầu:

curl --location --request PUT 'https://uptime247.vn/api/v1/monitors/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'name={name}'
Tham số
Loại
Mô tả
name
tùy chọn string
Tên.
url
tùy chọn string
URL.
interval
tùy chọn integer
Khoảng thời gian. Giá trị có thể là: 60, 180, 300, 600, 900, 1800, 3600.
ssl_alert_days
tùy chọn integer
Số ngày trước khi chứng chỉ SSL hết hạn để nhận cảnh báo. Giá trị có thể là: 0, 1, 2, 3, 7, 14, 30, 60.
maintenance_start_at
tùy chọn string
Ngày bắt đầu bảo trì theo định dạng Y-m-d H:i.
maintenance_end_at
tùy chọn string
Ngày kết thúc bảo trì theo định dạng Y-m-d H:i.
alerts[index][key]
tùy chọn string
Cảnh báo. Giá trị có thể là: email cho Email, webhook cho Webhook, slack cho Slack, teams cho Microsoft Teams, discord cho Discord, flock cho Flock, sms cho SMS.
alerts[index][value]
tùy chọn string
Giá trị cảnh báo.
paused
tùy chọn boolean
Tạm dừng.
Xóa

Điểm cuối API:

DELETE
https://uptime247.vn/api/v1/monitors/{id}

Ví dụ yêu cầu:

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