ByCloud Docs
GuidesCLIAPISDK
post/v1/health-monitors

Create health monitor

Create a new health monitor for a pool

Request Body

required

Content-Type: application/json

name

stringoptional

admin_state_up

booleanoptional

Default: true

pool_id

string<uuid>required

type

stringrequired

Enum: "HTTP", "HTTPS", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT", "SCTP"

delay

integerrequired

timeout

integerrequired

max_retries

integerrequired

max_retries_down

integeroptional

http_method

stringoptional

Enum: "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "OPTIONS", "CONNECT", "PATCH"

url_path

stringoptional

Default: "/"

expected_codes

stringoptional

Default: "200"

tags

arrayoptional

Responses

201

Health monitor created

Content-Type: application/json

health_monitor

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Pool not found

Content-Type: application/json

error

objectrequired
409

Pool already has a health monitor

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X POST "https://api.spo1.mycloud.com/v1/health-monitors" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"admin_state_up": true,
"pool_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "HTTP",
"delay": 1,
"timeout": 1,
"max_retries": 1,
"max_retries_down": 1,
"http_method": "GET",
"url_path": "/",
"expected_codes": "200",
"tags": [
"web",
"frontend"
]
}'