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}'
search
search_by
name
用於 姓名, url
用於 網址。 預設為:name
。status_page_id
sort_by
id
用於 建立日期, name
用於 姓名, url
用於 網址。 預設為:id
。sort
desc
用於 遞減, asc
用於 遞增。 預設為:desc
。per_page
10
, 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}'
name
url
interval
60
, 180
, 300
, 600
, 900
, 1800
, 3600
。alert_condition
url_unavailable
用於 網址無法使用, url_text
用於 網址回應包含指定文字, url_no_text
用於 網址回應不包含指定文字。alert_text_lookup
alert_condition
欄位設為 url_text
, url_no_text
時可用。request_method
GET
, POST
, HEAD
, PUT
, DELETE
, PATCH
, OPTIONS
。request_headers[index][key]
request_headers[index][value]
request_auth_username
request_auth_password
cache_buster
0
用於 已停用, 1
用於 啟用。 預設為:0
。ssl_alert_days
0
, 1
, 2
, 3
, 7
, 14
, 30
, 60
。domain_alert_days
0
, 1
, 2
, 3
, 7
, 14
, 30
, 60
。maintenance_start_at
Y-m-d H:i
。maintenance_end_at
Y-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}'
name
url
interval
60
, 180
, 300
, 600
, 900
, 1800
, 3600
。alert_condition
url_unavailable
用於 網址無法使用, url_text
用於 網址回應包含指定文字, url_no_text
用於 網址回應不包含指定文字。alert_text_lookup
alert_condition
欄位設為 url_text
, url_no_text
時可用。request_method
GET
, POST
, HEAD
, PUT
, DELETE
, PATCH
, OPTIONS
。request_headers[index][key]
request_headers[index][value]
request_auth_username
request_auth_password
cache_buster
0
用於 已停用, 1
用於 啟用。ssl_alert_days
0
, 1
, 2
, 3
, 7
, 14
, 30
, 60
。domain_alert_days
0
, 1
, 2
, 3
, 7
, 14
, 30
, 60
。maintenance_start_at
Y-m-d H:i
。maintenance_end_at
Y-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]
paused
API 端點:
https://newsbobo.com/api/v1/monitors/{id}
請求範例:
curl --location --request DELETE 'https://newsbobo.com/api/v1/monitors/{id}' \ --header 'Authorization: Bearer {api_key}'