Update an uptime monitor (HTTP, TCP port or ping).
const url = 'https://api.siteqwality.com/http/job/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"check_regions":["example"],"min_healthy_regions":1,"friendly_name":"example","follow_redirects":true,"final_uri":"example","method":"example","keyword_search":"example","keyword_search_inverted":true,"keyword_search_case_sensitive":true,"keyword_search_regex":true,"timeout_ms":1,"uri":"example","request_body":"example","content_type":"json","auth_type":"basic","auth_username":"example","auth_password":"example","auth_bearer_token":"example","success_http_codes":[1],"failure_http_codes":[1],"custom_http_headers":"example","run_interval_seconds":1,"run_interval_thirty_seconds":true,"group_notification_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"monitor_tls":true,"monitor_dns":true,"monitor_page_speed":true,"state":"active","tags":["example"],"http_version":"auto","confirmation_threshold":1,"json_path":"example","json_path_expected":"example","tls_port":1,"alert_on_invalid_certificate":true,"recovery_period_runs":1,"flap_hold":true,"flap_hold_override":true,"trace_propagation":true,"service_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","check_type":"http","tcp_send":"example","tcp_expect":"example","tcp_tls":true,"ping_count":1,"ping_loss_threshold":1,"recheck_on_failure":"off","web_bot_auth":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siteqwality.com/http/job/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "check_regions": [ "example" ], "min_healthy_regions": 1, "friendly_name": "example", "follow_redirects": true, "final_uri": "example", "method": "example", "keyword_search": "example", "keyword_search_inverted": true, "keyword_search_case_sensitive": true, "keyword_search_regex": true, "timeout_ms": 1, "uri": "example", "request_body": "example", "content_type": "json", "auth_type": "basic", "auth_username": "example", "auth_password": "example", "auth_bearer_token": "example", "success_http_codes": [ 1 ], "failure_http_codes": [ 1 ], "custom_http_headers": "example", "run_interval_seconds": 1, "run_interval_thirty_seconds": true, "group_notification_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "monitor_tls": true, "monitor_dns": true, "monitor_page_speed": true, "state": "active", "tags": [ "example" ], "http_version": "auto", "confirmation_threshold": 1, "json_path": "example", "json_path_expected": "example", "tls_port": 1, "alert_on_invalid_certificate": true, "recovery_period_runs": 1, "flap_hold": true, "flap_hold_override": true, "trace_propagation": true, "service_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "check_type": "http", "tcp_send": "example", "tcp_expect": "example", "tcp_tls": true, "ping_count": 1, "ping_loss_threshold": 1, "recheck_on_failure": "off", "web_bot_auth": true }'check_type is fixed at create; uri and the type-specific fields follow the stored type.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”HTTP monitor identifier
Request Body required
Section titled “Request Body required ”object
Replaces the stored headers. Absent keeps them; null or {} removes them.
Number of consecutive failed checks (1-10) required before the monitor is considered down and notifications are sent.
Port the TLS check connects to, 1 to 65535. Omitted keeps the stored
port (443 for a new TLS check). Needs monitor_tls.
Alert when the certificate is one a browser would reject. Omitted keeps
the stored setting (true for a new TLS check). Ignored without monitor_tls.
Healthy runs in a row (1-10) before a recovery is notified.
Deprecated: sets flap_hold_override when that is absent.
Absent leaves it unchanged; null follows the account’s notification setting.
The service this monitor belongs to; null detaches it and omission keeps it.
tcp only. Absent keeps it; null or "" sends nothing.
tcp only. Absent keeps it; null or "" makes connecting enough.
tcp only.
ping only, 1 to 10.
ping only, 1 to 100.
http only. Sign check requests with Web Bot Auth. Absent leaves it unchanged.
Responses
Section titled “ Responses ”HTTP monitor updated
Invalid request body
Missing or invalid authentication
Resuming needs a paid plan or a free monitor slot
Feature requires a paid plan
HTTP monitor or service not found
Internal server error