API 端點:
https://newsbobo.com/api/v1/monitors
請求範例:
curl --location --request GET 'https://newsbobo.com/api/v1/monitors' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
searchsearch_byname 用於 姓名, url 用於 網址。 預設為:name。status_page_idsort_byid 用於 建立日期, name 用於 姓名, url 用於 網址。 預設為:id。sortdesc 用於 遞減, asc 用於 遞增。 預設為:desc。per_page10, 25, 50, 100。 預設為:10。API 端點:
https://newsbobo.com/api/v1/monitors/{id}
請求範例:
curl --location --request GET 'https://newsbobo.com/api/v1/monitors/{id}' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer {api_key}'
API 端點:
https://newsbobo.com/api/v1/monitors
請求範例:
curl --location --request POST 'https://newsbobo.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}'
nameurlinterval60, 180, 300, 600, 900, 1800, 3600。alert_conditionurl_unavailable 用於 網址無法使用, url_text 用於 網址回應包含指定文字, url_no_text 用於 網址回應不包含指定文字。alert_text_lookupalert_condition 欄位設為 url_text, url_no_text 時可用。request_methodGET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS。request_headers[index][key]request_headers[index][value]request_auth_usernamerequest_auth_passwordcache_buster0 用於 已停用, 1 用於 啟用。 預設為:0。ssl_alert_days0, 1, 2, 3, 7, 14, 30, 60。domain_alert_days0, 1, 2, 3, 7, 14, 30, 60。maintenance_start_atY-m-d H:i。maintenance_end_atY-m-d H:i。alerts[index][key]email 用於 Email, webhook 用於 Webhook, slack 用於 Slack, teams 用於 Microsoft Teams, discord 用於 Discord, flock 用於 Flock, sms 用於 SMS。alerts[index][value]API 端點:
https://newsbobo.com/api/v1/monitors/{id}
請求範例:
curl --location --request PUT 'https://newsbobo.com/api/v1/monitors/{id}' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer {api_key}' \ --data-urlencode 'name={name}'
nameurlinterval60, 180, 300, 600, 900, 1800, 3600。alert_conditionurl_unavailable 用於 網址無法使用, url_text 用於 網址回應包含指定文字, url_no_text 用於 網址回應不包含指定文字。alert_text_lookupalert_condition 欄位設為 url_text, url_no_text 時可用。request_methodGET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS。request_headers[index][key]request_headers[index][value]request_auth_usernamerequest_auth_passwordcache_buster0 用於 已停用, 1 用於 啟用。ssl_alert_days0, 1, 2, 3, 7, 14, 30, 60。domain_alert_days0, 1, 2, 3, 7, 14, 30, 60。maintenance_start_atY-m-d H:i。maintenance_end_atY-m-d H:i。alerts[index][key]email 用於 Email, webhook 用於 Webhook, slack 用於 Slack, teams 用於 Microsoft Teams, discord 用於 Discord, flock 用於 Flock, sms 用於 SMS。alerts[index][value]pausedAPI 端點:
https://newsbobo.com/api/v1/monitors/{id}
請求範例:
curl --location --request DELETE 'https://newsbobo.com/api/v1/monitors/{id}' \ --header 'Authorization: Bearer {api_key}'