---
title: "Generate daemon upgrade commands"
method: GET
path: "/api/v1/daemons/{id}/upgrade-command"
tags: ["Daemons"]
---

# Generate daemon upgrade commands

`GET /api/v1/daemons/{id}/upgrade-command`

## Request

- Base URL: `https://app.scanopy.net`
- URL: `https://app.scanopy.net/api/v1/daemons/{id}/upgrade-command`
- Auth: one of:
  - API key in header `Authorization`
  - API key in cookie `session_id`

The steps to replace a daemon's binary and restart it, per OS, plus the docker method. Like the
install command, a pure builder over the daemon record.

## Path parameters

- `id` string, uuid, required

## Response `200`

Upgrade commands

- ApiResponseUpgradeArtifacts: Envelope for a successful response. Failures are sent with a non-2xx status and an `ApiErrorResponse` body instead.
  - `data` object: Everything the UI needs to upgrade a daemon: the binary steps per OS, and the docker method.
    - `docker` DockerUpgrade, required: The docker upgrade method.
      - `config_copy` string, nullable: Copies the daemon's config onto the `daemon-config` volume before the recreate. Set for images that keep config outside the volume, where the recreate would otherwise erase it.
      - `pinned_image` string, required: The compose `image:` line pinned to this server's version.
      - `pull` string, required: Pulls and recreates on the `latest` tag.
    - `freebsd` UpgradeStep[], required: Binary upgrade steps on FreeBSD.
      - `command` string, required: The shell command to run.
      - `type` 'Download' | 'Restart' | 'Stop' | 'Start', required: What one upgrade step does. The UI labels each step by its type.
    - `legacy_service_name` boolean, required: The restart step names the service after the daemon, as installs from before the install engine were named. Such a daemon may have been set up differently, so the UI points the operator to `scanopy-daemon list` for the real service.
    - `linux` UpgradeStep[], required: Binary upgrade steps on Linux.
      - `command` string, required: The shell command to run.
      - `type` 'Download' | 'Restart' | 'Stop' | 'Start', required: What one upgrade step does. The UI labels each step by its type.
    - `macos` UpgradeStep[], required: Binary upgrade steps on macOS.
      - `command` string, required: The shell command to run.
      - `type` 'Download' | 'Restart' | 'Stop' | 'Start', required: What one upgrade step does. The UI labels each step by its type.
    - `windows` UpgradeStep[], required: Binary upgrade steps on Windows.
      - `command` string, required: The shell command to run.
      - `type` 'Download' | 'Restart' | 'Stop' | 'Start', required: What one upgrade step does. The UI labels each step by its type.
  - `error` string, nullable: Not sent on a successful response. Failure messages arrive in an `ApiErrorResponse`.
  - `meta` ApiMeta, required: API metadata included in all responses
    - `api_version` integer, required: API version (integer, increments on breaking changes)
    - `server_version` string, required: Server version (semver)
  - `success` boolean, required: Always `true` on a successful response.

## Other responses

- `404`: daemon not found

## Changes

- **2026-10-11** `9efcc548d077`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/daemons/:id/upgrade-command/get.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) - [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scanopy/apis/scanopy-api/revisions/966ba786bdb5?raw)
