Jobs /
Update job health checks
Required permission
Project > Jobs > General > Update
Path parameters
projectId
string requiredID of the project
jobId
string requiredID of the job
Request body
- {object}
healthChecks
[array] requiredAn array of health checks
- {object}
protocol
string requiredThe protocol to access the health check with.
one ofHTTP, CMD, TCPtype
string requiredThe type of health check.
one oflivenessProbe, readinessProbe, startupProbepath
stringThe path of the health check endpoint. Required when protocol is HTTP.
pattern^\/([a-zA-Z0-9-._]+\/)*[a-zA-Z0-9-._]+$cmd
stringThe command to run for the health check. Required when protocol is CMD
port
integerPort number for the health check endpoint. Required when protocol is HTTP.
min1initialDelaySeconds
integer requiredInitial delay, in seconds, before the health check is first run.
min1periodSeconds
integer requiredThe time between each check, in seconds.
min1timeoutSeconds
integer requiredThe time to wait for a response before marking the health check as a failure.
min1failureThreshold
integer requiredThe maximum number of allowed failures.
min1successThreshold
integerThe number of successes required to mark the health check as a success.
min1
Response body
- {object}
Response object.
data
{object} requiredResult data.
POST /v1/projects/{projectId}/jobs/{jobId}/health-checks
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"healthChecks":[{"protocol":"HTTP","type":"readinessProbe","path":"/health-check","port":3000,"initialDelaySeconds":10,"periodSeconds":60,"timeoutSeconds":1,"failureThreshold":3,"successThreshold":1}]}' \
http://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/health-checks
Example response
200 OK
JSON
{
"data": {}
}