# Get job instance health

Current instance health and up to 50 recently terminated instances. Current state is observed now, even when a historical window is requested. Probe output is excluded.

Required permission: Project > Jobs > Deployment > View Observability

**Path parameters:**

{object}
- `projectId`: (string) (required) ID of the project
- `jobId`: (string) (required) ID of the job

**Query parameters:**

{object}
- `duration`: (integer)
- `endTime`: (string)
- `runId`: (string)

**Response body:**

{object}
- `data`: {object}
  - `observedAt`: (string) (format: date-time)
  - `window`: {object}
    - `start`: (string) (format: date-time)
    - `end`: (string) (format: date-time)
  - `byoc`: (boolean)
  - `current`: {object}
    - `containers`: [array of] {object}
        - `name`: (string)
        - `status`: (string)
        - `terminated`: (boolean)
        - `deploymentId`: (string)
        - `buildId`: (string)
        - `runId`: (string)
        - `nodeName`: (string)
        - `nodePool`: (string)
        - `nodePoolUserId`: (string)
        - `nodePoolProviderId`: (string)
        - `createdAt`: (number) (format: float)
        - `updatedAt`: (number) (format: float)
        - `restartCount`: (number) (format: float)
        - `lastFailure`: (string) (format: date-time)
        - `lastExitCode`: (number) (format: float)
        - `lastFailureReason`: (string)
        - `eviction`: {object}
          - `message`: (string)
          - `lastFailure`: (string) (format: date-time)
        - `containerReason`: (string)
        - `conditions`: [array of] {object}
            - `type`: (string)
            - `status`: (string)
            - `reason`: (string)
            - `message`: (string)
            - `lastTransitionTime`: (string) (format: date-time)
            - `lastProbeTime`: (string) (format: date-time)
        - `probes`: [array of] {object}
            - `kind`: (string)
            - `state`: (string)
            - `timestamp`: (string) (format: date-time)
            - `type`: (string)
            - `latency`: (number) (format: float)
            - `httpStatus`: (number) (format: float)
            - `exitCode`: (number) (format: float)
        - `history`: [array of] {object}
            - `status`: (string)
            - `timestamp`: (string) (format: date-time)
    - `hasMore`: (boolean)
  - `recent`: {object}
    - `containers`: [array of] {object}
        - `name`: (string)
        - `status`: (string)
        - `terminated`: (boolean)
        - `deploymentId`: (string)
        - `buildId`: (string)
        - `runId`: (string)
        - `nodeName`: (string)
        - `nodePool`: (string)
        - `nodePoolUserId`: (string)
        - `nodePoolProviderId`: (string)
        - `createdAt`: (number) (format: float)
        - `updatedAt`: (number) (format: float)
        - `restartCount`: (number) (format: float)
        - `lastFailure`: (string) (format: date-time)
        - `lastExitCode`: (number) (format: float)
        - `lastFailureReason`: (string)
        - `eviction`: {object}
          - `message`: (string)
          - `lastFailure`: (string) (format: date-time)
        - `containerReason`: (string)
        - `conditions`: [array of] {object}
            - `type`: (string)
            - `status`: (string)
            - `reason`: (string)
            - `message`: (string)
            - `lastTransitionTime`: (string) (format: date-time)
            - `lastProbeTime`: (string) (format: date-time)
        - `probes`: [array of] {object}
            - `kind`: (string)
            - `state`: (string)
            - `timestamp`: (string) (format: date-time)
            - `type`: (string)
            - `latency`: (number) (format: float)
            - `httpStatus`: (number) (format: float)
            - `exitCode`: (number) (format: float)
        - `history`: [array of] {object}
            - `status`: (string)
            - `timestamp`: (string) (format: date-time)
    - `hasMore`: (boolean)

## API reference

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

GET /v1/teams/{teamId}/projects/{projectId}/jobs/{jobId}/health

### Example Response

200 OK: Bounded current and historical instance evidence.

```json
undefined
```

## CLI reference

$ northflank get job health

Options:

- `--projectId <projectId>`: ID of the project

- `--jobId <jobId>`: ID of the job

- `--duration <duration>`: undefined

- `--endTime <endTime>`: undefined

- `--runId <runId>`: undefined

- `--verbose `: Verbose output

- `--quiet `: No console output

- `-o --output <format>`: Output formatting 

### Example Response

 Bounded current and historical instance evidence.

```json
undefined
```

## JavaScript client reference

### Example request



With an organization token, add `parameters.teamId`. [Organization API access](/docs/v1/api/use-the-api#organization-api-access).

```javascript
await apiClient.get.job.health({
  parameters: {
    "projectId": "default-project",
    "jobId": "example-job"
  }
});
```

### Example Response

 Bounded current and historical instance evidence.

```json
{
  "rawResponse": "...",
  "request": "...",
  "error": "..."
}
```

## Python client reference

### Example request

[Set up the Python client](/docs/v1/api/use-the-python-client#usage).



With an organization token, add `team_id`. [Organization API access](/docs/v1/api/use-the-api#organization-api-access).

Python SDK 2.1.0 has no generated method for this endpoint. Use the API example for this request.

Previous: [Update job deployment](/docs/v1/api/project/jobs/update-job-deployment)

Next: [Get job health checks](/docs/v1/api/project/jobs/get-job-health-checks)