監控項目

備註
進階等級
API 金鑰應以 Bearer Token 格式加入請求的 Authorization 標頭中。 取得您的 API 金鑰.
列表

API 端點:

GET
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
選填 string
搜尋查詢字串。
search_by
選填 string
搜尋依據. 可能的值有:name 用於 姓名, url 用於 網址。 預設為:name
status_page_id
選填 integer
狀態頁面 ID.
sort_by
選填 string
排序方式. 可能的值有:id 用於 建立日期, name 用於 姓名, url 用於 網址。 預設為:id
sort
選填 string
排序. 可能的值有:desc 用於 遞減, asc 用於 遞增。 預設為:desc
per_page
選填 integer
每頁顯示筆數. 可能的值有:10, 25, 50, 100。 預設為:10
顯示

API 端點:

GET
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 端點:

POST
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
必填 string
姓名.
url
必填 string
網址.
interval
必填 integer
間隔. 可能的值有:60, 180, 300, 600, 900, 1800, 3600
alert_condition
必填 string
警報條件. 可能的值有:url_unavailable 用於 網址無法使用, url_text 用於 網址回應包含指定文字, url_no_text 用於 網址回應不包含指定文字
alert_text_lookup
選填 string
觸發警報所搜尋的文字。 僅當 alert_condition 欄位設為 url_text, url_no_text 時可用。
request_method
必填 string
請求方法. 可能的值有:GET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS
request_headers[index][key]
選填 string
請求標頭名稱。
request_headers[index][value]
選填 string
請求標頭值。
request_auth_username
選填 string
Username for Basic HTTP request authentication.
request_auth_password
選填 string
Password for Basic HTTP request authentication.
cache_buster
選填 integer
快取清除器. 可能的值有:0 用於 已停用, 1 用於 啟用。 預設為:0
ssl_alert_days
選填 integer
SSL 憑證到期前幾天發送警示。 可能的值有:0, 1, 2, 3, 7, 14, 30, 60
domain_alert_days
選填 integer
距離網域名稱到期前多少天收到警報。 可能的值有:0, 1, 2, 3, 7, 14, 30, 60
maintenance_start_at
選填 string
維護開始日期格式為 Y-m-d H:i
maintenance_end_at
選填 string
維護結束日期格式為 Y-m-d H:i
alerts[index][key]
選填 string
警報管道. 可能的值有:email 用於 Email, webhook 用於 Webhook, slack 用於 Slack, teams 用於 Microsoft Teams, discord 用於 Discord, flock 用於 Flock, sms 用於 SMS
alerts[index][value]
選填 string
警示的數值。
更新

API 端點:

PUT PATCH
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
選填 string
姓名.
url
選填 string
網址.
interval
選填 integer
間隔. 可能的值有:60, 180, 300, 600, 900, 1800, 3600
alert_condition
選填 string
警報條件. 可能的值有:url_unavailable 用於 網址無法使用, url_text 用於 網址回應包含指定文字, url_no_text 用於 網址回應不包含指定文字
alert_text_lookup
選填 string
觸發警報所搜尋的文字。 僅當 alert_condition 欄位設為 url_text, url_no_text 時可用。
request_method
選填 string
請求方法. 可能的值有:GET, POST, HEAD, PUT, DELETE, PATCH, OPTIONS
request_headers[index][key]
選填 string
請求標頭名稱。
request_headers[index][value]
選填 string
請求標頭值。
request_auth_username
選填 string
Username for Basic HTTP request authentication.
request_auth_password
選填 string
Password for Basic HTTP request authentication.
cache_buster
選填 integer
快取清除器. 可能的值有:0 用於 已停用, 1 用於 啟用
ssl_alert_days
選填 integer
SSL 憑證到期前幾天發送警示。 可能的值有:0, 1, 2, 3, 7, 14, 30, 60
domain_alert_days
選填 integer
距離網域名稱到期前多少天收到警報。 可能的值有:0, 1, 2, 3, 7, 14, 30, 60
maintenance_start_at
選填 string
維護開始日期格式為 Y-m-d H:i
maintenance_end_at
選填 string
維護結束日期格式為 Y-m-d H:i
alerts[index][key]
選填 string
警報管道. 可能的值有:email 用於 Email, webhook 用於 Webhook, slack 用於 Slack, teams 用於 Microsoft Teams, discord 用於 Discord, flock 用於 Flock, sms 用於 SMS
alerts[index][value]
選填 string
警示的數值。
paused
選填 boolean
已暫停.
刪除

API 端點:

DELETE
https://newsbobo.com/api/v1/monitors/{id}

請求範例:

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