v1
Double column
API
CLI
JS Client

Jobs /

Get job health checks

Lists the health checks for the given job.

Required permission

Project > Jobs > General > Read

Path parameters

    • projectId

      string required

      ID of the project

    • jobId

      string required

      ID of the job

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result data.

      • healthChecks

        [array] required

        An array of health checks.

        • {object}
          • protocol

            string required

            The protocol to access the health check with.

            one of
            HTTP, CMD, TCP
          • type

            string required

            The type of health check.

            one of
            livenessProbe, readinessProbe
          • path

            string

            The path of the health check endpoint.

          • cmd

            The command to run for the health check.

          • httpPort

            HTTP port number for the health check endpoint.

          • tcpSocketPort

            TCP port number for the health check endpoint.

          • 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

            The number of successes required to mark the health check as a success.

API
CLI
JS Client

GET /v1/projects/{projectId}/jobs/{jobId}/health-checks

Example response

200 OK

Details about the health checks for the job.

JSON

{
  "data": {
    "healthChecks": [
      {
        "protocol": "HTTP",
        "type": "readinessProbe",
        "path": "/health-check",
        "httpPort": 3000,
        "initialDelaySeconds": 10,
        "periodSeconds": 60,
        "timeoutSeconds": 1,
        "failureThreshold": 3,
        "successThreshold": 1
      }
    ]
  }
}

© 2022 Northflank Ltd. All rights reserved.