---
title: "Returns API's health status"
method: GET
path: "/health"
tags: ["private"]
---

# Returns API's health status

`GET /health`

## Request

- Base URL: `http://localhost:26900`
- URL: `http://localhost:26900/health`
- Auth: none required

Returns health status of the API and checks on dependent services

## Response `200`

Successfully returns OK status with checks of dependent services

- Health
  - `status` 'OK' | 'WARNING' | 'CRITICAL': The status of the API
  - `version` object
    - `build_time` string: The build date and time of the API
    - `git_commit` string: The git commit hash of the API
    - `language` string: The programming language used to implement API
    - `language_version` string: The version of the programming language used to implement API
    - `version` string: The version of API
  - `uptime` string: The uptime of API
  - `start_time` string: The start date and time of API running
  - `checks` HealthChecker[]
    - `name` 'mongodb': The name of external service used by API
    - `status` 'OK' | 'WARNING' | 'CRITICAL': The status of the external service
    - `message` string: The message status of the external service
    - `last_checked` string: The last health health date and time of the external service
    - `last_success` string: The last successful health health date and time of the external service
    - `last_failure` string: The last failed health health date and time of the external service

## Other responses

- `429`: Services warming up or degraded (at least one health in WARNING or CRITICAL status)
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/files-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/files-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/files-api/revisions/b34c9662a495?raw)
