Services /
Update health checks
Updates health checks for the given service.
URL parameters
project
string required
ID of the project
service
string required
ID of the service
Request attributes
object
healthChecks
array required
An array of health checks
object
protocol
string required
The protocol to access the health check with.
one of: HTTP, TCP, HTTPS, CMD
type
string required
The type of health check.
one of: livenessProbe, readinessProbe
path
(multiple options)
The path of the health check endpoint. Required when protocol is HTTP or HTTPS.
string
pattern: ^\/([a-zA-Z0-9-.]+\/)*[a-zA-Z0-9-.]+$
cmd
(multiple options)
The command to run for the health check. Required when protocol is CMD
string
port
(multiple options)
Port number for the health check endpoint. Required when protocol is HTTP, HTTPS or TCP.
integer
min: 1
initialDelaySeconds
integer required
Initial delay, in seconds, before the health check is first run.
min: 1
periodSeconds
integer required
The time between each check, in seconds.
min: 1
timeoutSeconds
integer required
min: 1
failureThreshold
integer required
The maximum number of allowed failures.
min: 1
successThreshold
(multiple options)
The number of successes required to mark the health check as a success.
integer
min: 1
POST /v1beta/projects/{project}/services/{service}/health-checks
Example request
request body
curl
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"healthChecks":[{"protocol":"HTTPS","type":"readinessProbe","path":"/health-check","port":3000,"initialDelaySeconds":10,"periodSeconds":60,"timeoutSeconds":1,"failureThreshold":3,"successThreshold":1}]}' \
https://api.northflank.com/v1beta/projects/{project}/services/{service}/health-checks
Example response
200 OK
success