서버 모니터
GET https://uptime4.com/api/server-monitors/
curl --request GET \
--url 'https://uptime4.com/api/server-monitors/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/server-monitors/' \
--header 'Authorization: Bearer {api_key}' \
매개변수 | 세부사항 | 설명 |
---|---|---|
page | 선택 사항 정수 | 결과를 원하는 페이지 번호입니다. 기본값은 1 입니다. |
results_per_page | 선택 사항 정수 | 페이지당 원하는 결과 수는 얼마입니까? 허용되는 값은: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . 기본값은 25 입니다. |
{
"data": [
{
"id": 1,
"project_id": 0,
"name": "Sample",
"target": "123.123.123.123",
"settings": {
"server_check_interval_seconds": 60
},
"cpu_usage": 0.7,
"ram_usage": 30.65,
"disk_usage": 16.49,
"cpu_load_1": 0,
"cpu_load_5": 0,
"cpu_load_15": 0,
"is_enabled": true,
"total_logs": 100,
"last_log_datetime": "2024-01-14 02:45:05",
"datetime": "2025-02-23 19:05:03",
"last_datetime": null
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://uptime4.com/api/server-monitors?&page=1",
"last": "https://uptime4.com/api/server-monitors?&page=1",
"next": null,
"prev": null,
"self": "https://uptime4.com/api/server-monitors?&page=1"
}
}
GET https://uptime4.com/api/server-monitors/{server_monitor_id}
curl --request GET \
--url 'https://uptime4.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"project_id": 0,
"name": "Sample",
"target": "123.123.123.123",
"settings": {
"server_check_interval_seconds": 60
},
"cpu_usage": 0.7,
"ram_usage": 30.65,
"disk_usage": 16.49,
"cpu_load_1": 0,
"cpu_load_5": 0,
"cpu_load_15": 0,
"is_enabled": true,
"total_logs": 100,
"last_log_datetime": "2024-01-14 02:45:05",
"datetime": "2025-02-23 19:05:03",
"last_datetime": null
}
}
POST https://uptime4.com/api/server-monitors
매개변수 | 세부사항 | 설명 |
---|---|---|
name | 필수 문자열 | - |
target | 필수 문자열 | - |
project_id | 선택 사항 정수 | - |
notifications | 선택 사항 배열 | 알림 처리기 ID |
server_check_interval_seconds | 선택 사항 정수 | 허용된 값: 60 , 300 , 600 , 900 , 1800 (초) |
alert_metric[key] | 선택 사항 문자열 | 허용된 값: cpu_usage , disk_usage , ram_usage |
alert_rule[key] | 선택 사항 문자열 | 허용된 값: is_higher , is_lower |
alert_value[key] | 선택 사항 문자열 | 허용된 값: 1-99 |
alert_trigger[key] | 선택 사항 문자열 | 허용된 값: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 |
is_enabled | 선택 사항 부울 | - |
curl --request POST \
--url 'https://uptime4.com/api/server-monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=example.com' \
--url 'https://uptime4.com/api/server-monitors' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'target=example.com' \
{
"data": {
"id": 1
}
}
POST https://uptime4.com/api/server-monitors/{server_monitor_id}
매개변수 | 세부사항 | 설명 |
---|---|---|
name | 필수 문자열 | - |
target | 필수 문자열 | - |
project_id | 선택 사항 정수 | - |
notifications | 선택 사항 배열 | 알림 처리기 ID |
server_check_interval_seconds | 선택 사항 정수 | 허용된 값: 60 , 300 , 600 , 900 , 1800 (초) |
alert_metric[key] | 선택 사항 문자열 | 허용된 값: cpu_usage , disk_usage , ram_usage |
alert_rule[key] | 선택 사항 문자열 | 허용된 값: is_higher , is_lower |
alert_value[key] | 선택 사항 문자열 | 허용된 값: 1-99 |
alert_trigger[key] | 선택 사항 문자열 | 허용된 값: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 |
is_enabled | 선택 사항 부울 | - |
curl --request POST \
--url 'https://uptime4.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--url 'https://uptime4.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
{
"data": {
"id": 1
}
}
DELETE https://uptime4.com/api/server-monitors/{server_monitor_id}
curl --request DELETE \
--url 'https://uptime4.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/server-monitors/{server_monitor_id}' \
--header 'Authorization: Bearer {api_key}' \