PATCH /zones/{zone_id}/healthchecks/{healthcheck_id}
Patch a configured health check.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
Name | Type | Required | Description |
---|---|---|---|
healthcheck_id |
String | Yes | |
zone_id |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
check_regions[] |
Array | No |
A list of regions from which to run health checks. Null means Cloudflare will pick a default region. |
description |
String | No |
A human-readable description of the health check. |
tcp_config |
Object | No |
Parameters specific to TCP health check. |
tcp_config.port |
Integer | No |
Port number to connect to for the health check. Defaults to 80. Default value: 80 |
tcp_config.method |
String | No |
The TCP connection method to use for the health check. Possible values:
Default value: "connection_established" |
interval |
Integer | No |
The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. Default value: 60 |
suspended |
Boolean | No |
If suspended, no health checks are sent to the origin. Default value: false |
http_config |
Object | No |
Parameters specific to an HTTP or HTTPS health check. |
http_config.port |
Integer | No |
Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS. Default value: 80 |
http_config.method |
String | No |
The HTTP method to use for the health check. Possible values:
Default value: "GET" |
http_config.expected_codes[] |
Array | No |
The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check. |
http_config.header |
Object | No |
The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. |
http_config.header.name |
String | No | |
http_config.follow_redirects |
Boolean | No |
Follow redirects if the origin returns a 3xx status code. Default value: false |
http_config.path |
String | No |
The endpoint path to health check against. Default value: "/" |
http_config.allow_insecure |
Boolean | No |
Do not validate the certificate when the health check uses HTTPS. Default value: false |
http_config.expected_body |
String | No |
A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. |
retries |
Integer | No |
The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. Default value: 2 |
name |
String | Yes |
A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed. |
consecutive_fails |
Integer | No |
The number of consecutive fails required from a health check before changing the health to unhealthy. Default value: 1 |
consecutive_successes |
Integer | No |
The number of consecutive successes required from a health check before changing the health to healthy. Default value: 1 |
timeout |
Integer | No |
The timeout (in seconds) before marking the health check as failed. Default value: 5 |
type |
String | No |
The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. Default value: "HTTP" |
address |
String | Yes |
The hostname or IP address of the origin server to run health checks on. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.