---
title: "Start an external service"
method: POST
path: "/external-services/{id}/start"
tags: ["External Services"]
---

# Start an external service

`POST /external-services/{id}/start`

## 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}/start`
- Auth: none declared

## Path parameters

- `id` integer, required

## Response `200`

Service started successfully

- ExternalServiceInfo
  - `connection_info` string, nullable
  - `continuous_archive_pinned_at` string, nullable: When `continuous_archive_s3_source_id` was last set. Null alongside a non-null source id means it was set by the original provisioning flow rather than an explicit repoint.
  - `continuous_archive_s3_source_id` integer, nullable: S3 source ID that this service's continuous archiving (Postgres/ Timescale WAL-G `archive_command`, or MariaDB's binlog shipper) currently writes to. Null for service types with no continuous archiving concept, or a Postgres/MariaDB service that has never had one provisioned. Change it with `repoint_continuous_archive_source`.
  - `created_at` string, required
  - `error_message` string, nullable: Error message from failed initialization.
  - `id` integer, required
  - `members` ServiceMemberInfo[]: Cluster members (empty for standalone services).
    - `compute_ip` string, nullable: Container's IP on the `temps-overlay` multi-host network. Populated by the lifecycle hook (ADR-011 Phase 3); `None` on single-host clusters where the overlay isn't attached.
    - `container_name` string, required
    - `hostname` string, nullable
    - `id` integer, required
    - `live_state` string, nullable: Live FSM state from the pg_auto_failover monitor (`primary`, `secondary`, `catchingup`, `report_lsn`, …). `None` when the monitor is unreachable, the service is not a cluster, or the row is the monitor itself. **The UI must render the role badge from this field**, falling back to `role` only when `live_state` is null. `role` is now config-only (`monitor` or `replica`); flipping the badge to "primary" when the monitor elects a new one used to require a reconciler that lagged ~5s behind real failovers — and during that window the UI showed two primaries. `live_state` is read directly from the monitor on every list, so it can never lag.
    - `node_id` integer, nullable
    - `ordinal` integer, required
    - `port` integer, nullable
    - `provisioning_error` string, nullable: Most recent provisioning failure message, when `status='failed'`. Set by the background task so the UI can show *why* the new replica didn't come up.
    - `provisioning_step` string, nullable: Last-attempted phase of the async `add_cluster_member` background task (e.g. `validating`, `provisioning_container`, `done`, `failed`). `None` for members not created through that flow — the UI falls back to the `status` column for those.
    - `role` string, required: Configured member kind. For a PostgreSQL cluster this is `monitor` or `replica`, and every data node is `replica`, including the current primary: which node is primary is runtime state, read it from `live_state`.
    - `status` string, required
  - `metrics_enabled` boolean: Whether metric collection is enabled for this service. The UI uses this to decide whether to poll the monitoring endpoints.
  - `name` string, required
  - `node_id` integer, nullable: Node ID where the service runs. Null means control plane (local).
  - `readiness` ServiceReadiness, nullable: Startup readiness of a service that is `starting` or failed to start.
    - `deadline_secs` integer, required: How long the gate waits before reporting failure.
    - `failure` InitializationFailure, nullable: A failed initialization, as shown to the operator.
      - `kind` 'store_init_failed' | 'restart_loop' | 'timeout', required: Why the gate gave up.
      - `log_excerpt` string[], required: Container log lines that explain the failure, oldest first. Secrets are redacted. Empty when the logs could not be read.
      - `next_actions` ReadinessNextAction[], required: Suggested next steps, most useful first.
      - `reason` string, required: What happened, including the last probe's typed reason.
    - `phase` 'starting' | 'failed', required: Where the gate is for a service.
    - `reason` string, nullable: Latest reason the service is not usable yet, from the engine's authenticated probe. Null before the first probe.
    - `restart_count` integer, required: Container restarts since the gate started.
    - `started_at` string, required: When the gate started waiting (ISO 8601, UTC).
  - `service_type` 'mariadb' | 'mongodb' | 'postgres' | 'redis' | 's3' | 'kv' | 'blob' | 'rustfs' | 'minio', required
  - `status` string, required
  - `topology` string, required: Service topology: "standalone" (single container) or "cluster" (HA multi-member).
  - `updated_at` string, required
  - `version` string, nullable

## Other responses

- `400`: The service's stored configuration cannot be used to start it
- `404`: Service not found
- `409`: A Postgres major upgrade is in progress, duplicate service names prevent safe resource control, another cluster action is in progress, the cluster or one of its members is still being provisioned, or the cluster's provisioning failed
- `500`: Internal server error

## Changes

- **2026-11-04** `aa6ea92a9415`: 1 info
  - added the non-success response with the status `400`
- **2026-10-09** `c2e6bffeca6c`: 1 info
  - added the optional property `readiness` to the response with the `200` status
- **2026-09-07** `cfd9d4606e8c`: 2 info
  - added the optional property `continuous_archive_pinned_at` to the response with the `200` status
  - added the optional property `continuous_archive_s3_source_id` to the response with the `200` status
- **2026-07-27** `1b060c0a4ba3`: 1 warning, 1 info
  - added the new `mariadb` enum value to the `service_type` response property for the response status `200`
  - added the non-success response with the status `409`
- **2026-06-05** `61b7612b2d33`: 1 info
  - added the optional property `metrics_enabled` to the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/external-services/:id/start/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)
