---
title: "Recreate a managed service's container to apply its healthcheck now"
method: POST
path: "/external-services/{id}/healthcheck/apply"
tags: ["External Services"]
---

# Recreate a managed service's container to apply its healthcheck now

`POST /external-services/{id}/healthcheck/apply`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/external-services/{id}/healthcheck/apply`
- Auth: HTTP bearer

The service restarts briefly. Its volumes and configuration are kept: the
original container is kept until the replacement holds the same data,
and put back otherwise. Only for a running standalone service on a
process that runs local containers: recreating starts the container, so
a stopped service is left alone. Not available for clusters, worker
databases or imported containers.

## Path parameters

- `id` integer, required

## Response `200`

The container was recreated

- ApplyServiceHealthcheckResponse: After `apply`: the container was recreated with these timings.
  - `applied` HealthcheckTimings, required: As this host's Docker got them: below API 1.44 the interval is the start interval.
    - `interval_secs` integer, required: Seconds between checks once the container is healthy.
    - `retries` integer, required: Consecutive failed checks that make the container unhealthy.
    - `start_interval_secs` integer, required: Seconds between checks while the container is starting, within `start_period_secs`.
    - `start_period_secs` integer, required: Seconds after start during which failed checks do not count and checks run every `start_interval_secs`.
    - `timeout_secs` integer, required: Seconds one check may run before it counts as failed.
  - `healthcheck` ServiceHealthcheck, nullable: A service's healthcheck as the console shows it.
    - `capability` HealthcheckCapability, required: Whether Temps can give this service's container a healthcheck, and whether it can recreate it from here to apply one now.
      - `apply_now_reason` string, nullable: Why not, when `can_apply_now` is false.
      - `can_apply_now` boolean, required: Temps can recreate the container from here to apply the settings.
      - `configurable` boolean, required: The container has a Docker healthcheck Temps builds, so overrides apply to it.
      - `reason` string, nullable: Why not, when `configurable` is false.
    - `effective` ResolvedHealthcheck, nullable: The values a container would be created with, and where each comes from.
      - `sources` HealthcheckSources, required: The source of each of the five values.
        - `interval_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `retries` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `start_interval_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `start_period_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `timeout_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
      - `timings` HealthcheckTimings, required: The five numbers of a Docker healthcheck, in whole seconds (retries is a count).
        - `interval_secs` integer, required: Seconds between checks once the container is healthy.
        - `retries` integer, required: Consecutive failed checks that make the container unhealthy.
        - `start_interval_secs` integer, required: Seconds between checks while the container is starting, within `start_period_secs`.
        - `start_period_secs` integer, required: Seconds after start during which failed checks do not count and checks run every `start_interval_secs`.
        - `timeout_secs` integer, required: Seconds one check may run before it counts as failed.
    - `engine` 'postgres' | 'redis' | 'mariadb' | 'mongodb' | 'rustfs' | 'minio', nullable: Engines whose containers Temps manages and may need to replace.
    - `inherited` ResolvedHealthcheck, nullable: The values a container would be created with, and where each comes from.
      - `sources` HealthcheckSources, required: The source of each of the five values.
        - `interval_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `retries` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `start_interval_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `start_period_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
        - `timeout_secs` 'builtin' | 'instance_default' | 'service', required: Where an effective healthcheck value comes from.
      - `timings` HealthcheckTimings, required: The five numbers of a Docker healthcheck, in whole seconds (retries is a count).
        - `interval_secs` integer, required: Seconds between checks once the container is healthy.
        - `retries` integer, required: Consecutive failed checks that make the container unhealthy.
        - `start_interval_secs` integer, required: Seconds between checks while the container is starting, within `start_period_secs`.
        - `start_period_secs` integer, required: Seconds after start during which failed checks do not count and checks run every `start_interval_secs`.
        - `timeout_secs` integer, required: Seconds one check may run before it counts as failed.
    - `overrides` HealthcheckOverrides, required: This service's own overrides (null = inherit).
      - `interval_secs` integer, nullable: Seconds between checks once healthy (5–3600).
      - `retries` integer, nullable: Consecutive failures that make the container unhealthy (1–10).
      - `start_interval_secs` integer, nullable: Seconds between checks while starting (1–60).
      - `start_period_secs` integer, nullable: Seconds after start during which failures do not count (0–600).
      - `timeout_secs` integer, nullable: Seconds one check may run (1–60, and shorter than the interval).
    - `overrides_ignored_reason` string, nullable: Why this service's overrides are set aside: they no longer combine with the instance default, so `effective` is what the container gets without them. Change or clear them to use them again.
    - `pending_recreate` boolean, required: The running container differs from `effective` (as this host's Docker would store it) until it is recreated. `false` when either is unknown.
    - `readiness_wait_secs` integer, nullable: How long Temps waits for a new container of this engine to become healthy; a check has to land inside it.
    - `running` HealthcheckTimings, nullable: The five numbers of a Docker healthcheck, in whole seconds (retries is a count).
      - `interval_secs` integer, required: Seconds between checks once the container is healthy.
      - `retries` integer, required: Consecutive failed checks that make the container unhealthy.
      - `start_interval_secs` integer, required: Seconds between checks while the container is starting, within `start_period_secs`.
      - `start_period_secs` integer, required: Seconds after start during which failed checks do not count and checks run every `start_interval_secs`.
      - `timeout_secs` integer, required: Seconds one check may run before it counts as failed.
    - `service_id` integer, required
    - `service_name` string, required
    - `service_type` string, required
    - `start_interval_supported` boolean, nullable: `false`: this host's Docker ignores the start interval, so the steady-state interval stays at the start interval. Absent when not known yet.
  - `service_id` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Service not found
- `409`: Temps will not recreate this container from here (not running, local workloads disabled, a cluster, worker or imported container), or the recreate was refused to protect its data
- `500`: The recreate failed; the original container was kept

## Changes

- **2026-11-14** `3d5be996525d`: 1 info
  - endpoint added
- **2026-11-14** `101ef74660bc`: 1 breaking
  - api path removed without deprecation
- **2026-11-13** `b24ba964110a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/external-services/:id/healthcheck/apply/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
