{
"address": "www.example.com",
"check_regions": [
"WEU",
"ENAM"
],
"consecutive_fails": 1,
"consecutive_successes": 1,
"description": "Health check for www.example.com",
"http_config": {
"allow_insecure": false,
"expected_body": "success",
"expected_codes": [
"2xx",
"302"
],
"follow_redirects": false,
"header": {
"Host": [
"example.com"
],
"X-App-ID": [
"abc123"
]
},
"method": "GET",
"path": "/health",
"port": 80
},
"interval": 60,
"name": "server-1",
"retries": 2,
"suspended": false,
"tcp_config": {
"method": "connection_established",
"port": 80
},
"timeout": 5,
"type": "HTTPS"
}
curl --location --request POST 'https://api.cloudflare.com/client/v4/zones//healthchecks/preview' \
--header 'Content-Type: application/json' \
--data-raw '{
"address": "www.example.com",
"check_regions": [
"WEU",
"ENAM"
],
"consecutive_fails": 1,
"consecutive_successes": 1,
"description": "Health check for www.example.com",
"http_config": {
"allow_insecure": false,
"expected_body": "success",
"expected_codes": [
"2xx",
"302"
],
"follow_redirects": false,
"header": {
"Host": [
"example.com"
],
"X-App-ID": [
"abc123"
]
},
"method": "GET",
"path": "/health",
"port": 80
},
"interval": 60,
"name": "server-1",
"retries": 2,
"suspended": false,
"tcp_config": {
"method": "connection_established",
"port": 80
},
"timeout": 5,
"type": "HTTPS"
}'
{
"errors": [],
"messages": [],
"result": {
"address": "www.example.com",
"check_regions": [
"WEU",
"ENAM"
],
"consecutive_fails": 1,
"consecutive_successes": 1,
"created_on": "2014-01-01T05:20:00.12345Z",
"description": "Health check for www.example.com",
"failure_reason": "",
"http_config": {
"allow_insecure": false,
"expected_body": "success",
"expected_codes": [
"2xx",
"302"
],
"follow_redirects": false,
"header": {
"Host": [
"example.com"
],
"X-App-ID": [
"abc123"
]
},
"method": "GET",
"path": "/health",
"port": 80
},
"id": "699d98642c564d2e855e9661899b7252",
"interval": 60,
"modified_on": "2014-01-01T05:20:00.12345Z",
"name": "server-1",
"retries": 2,
"status": "healthy",
"suspended": false,
"tcp_config": {
"method": "connection_established",
"port": 80
},
"timeout": 5,
"type": "HTTPS"
},
"success": true
}