Health API
Liveness checks. Never need the API key.
From 1.1.0-rc.6. https://imgcompress.example.com stands for your instance.
Liveness checks. Never need the API key.
From 1.1.0-rc.6. https://imgcompress.example.com stands for your instance.
Is the container up?
Never needs the API key. Operation ID: health.
When: Use for health checks and uptime monitors. Nothing to call before.
Cheap liveness check. Never needs the API key, so health checks and uptime monitors work with PUBLIC_API_KEY set. python /container/healthcheck.py uses it. GET /api/health/backend is a deprecated alias of this route and will be removed in 2.0.
bashcurl -fsS https://imgcompress.example.com/api/v1/health
| Status | Meaning | Content |
|---|---|---|
| 200 | The container answers. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
Health)#| Field | Type | Required | Description |
|---|---|---|---|
status | string | yes | One of: "running". |
api_version | string | no | |
utc_time | string (date-time) | yes |
Can the container reach the internet?
Never needs the API key. Operation ID: healthInternet.
When: Use to show an online badge. Nothing to call before; the API works offline either way.
Tries a TCP connection to 1.1.1.1:53 for up to one second. Everything works offline; the web UI only uses this for its status badge.
bashcurl -fsS https://imgcompress.example.com/api/v1/health/internet
| Status | Meaning | Content |
|---|---|---|
| 200 | Result of the check. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
InternetHealth)#| Field | Type | Required | Description |
|---|---|---|---|
internet | boolean | yes | |
utc_time | string (date-time) | yes |
Legacy alias of GET /health
Deprecated. Never needs the API key. Operation ID: legacyHealthBackend.
When: Only for old health checks. New setups call GET /api/v1/health.
Same answer as GET /api/v1/health, kept for existing health checks. Never needs the API key. Will be removed in 2.0; use GET /api/v1/health.
bashcurl -fsS https://imgcompress.example.com/api/health/backend
| Status | Meaning | Content |
|---|---|---|
| 200 | The container answers. | application/json |
| 403 | A browser on another website sent this while ENABLE_PUBLIC_API is off, or the feature is turned off on this container (storage management). | application/json |
Health)#| Field | Type | Required | Description |
|---|---|---|---|
status | string | yes | One of: "running". |
api_version | string | no | |
utc_time | string (date-time) | yes |