Update Health Check
PUT/zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}
Update a configured health check.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Update Health Check
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/smart_shield/healthchecks/$HEALTHCHECK_ID \
-X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"errors": [
{
"code": 1000,
"message": "message"
}
],
"messages": [
{
"code": 1000,
"message": "message"
}
],
"result": {},
"success": true
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"address": "www.example.com",
"check_regions": [
"WEU",
"ENAM"
],
"consecutive_fails": 0,
"consecutive_successes": 0,
"created_on": "2014-01-01T05:20:00.12345Z",
"description": "Health check for www.example.com",
"failure_reason": "",
"http_config": {
"allow_insecure": true,
"expected_body": "success",
"expected_codes": [
"2xx",
"302"
],
"follow_redirects": true,
"header": {
"Host": [
"example.com"
],
"X-App-ID": [
"abc123"
]
},
"method": "GET",
"path": "/health",
"port": 0
},
"interval": 0,
"modified_on": "2014-01-01T05:20:00.12345Z",
"name": "server-1",
"retries": 0,
"status": "healthy",
"suspended": true,
"tcp_config": {
"method": "connection_established",
"port": 0
},
"timeout": 0,
"type": "HTTPS"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"address": "www.example.com",
"check_regions": [
"WEU",
"ENAM"
],
"consecutive_fails": 0,
"consecutive_successes": 0,
"created_on": "2014-01-01T05:20:00.12345Z",
"description": "Health check for www.example.com",
"failure_reason": "",
"http_config": {
"allow_insecure": true,
"expected_body": "success",
"expected_codes": [
"2xx",
"302"
],
"follow_redirects": true,
"header": {
"Host": [
"example.com"
],
"X-App-ID": [
"abc123"
]
},
"method": "GET",
"path": "/health",
"port": 0
},
"interval": 0,
"modified_on": "2014-01-01T05:20:00.12345Z",
"name": "server-1",
"retries": 0,
"status": "healthy",
"suspended": true,
"tcp_config": {
"method": "connection_established",
"port": 0
},
"timeout": 0,
"type": "HTTPS"
},
"success": true
}