---
title: "Get Docker label inventory for a stack"
method: GET
path: "/api/stacks/{stackName}/label-inventory"
tags: ["Stacks"]
---

# Get Docker label inventory for a stack

`GET /api/stacks/{stackName}/label-inventory`

Returns declared Compose labels and runtime container labels per service, with reconciliation hints (only in Compose, only on running container, present in both, or value changed when the values differ) and provenance for each runtime label (compose, image, runtime, compose-system, or unknown when a container or image cannot be inspected). Secret-like label values are redacted unless the caller is an admin and passes `reveal=1`. Requires `stack:read` permission.

## Path parameters

- `stackName` string, required

## Query parameters

- `reveal` '1' | 'true'

## Headers

- `x-node-id` integer

## Response `200`

Stack label inventory.

- StackLabelInventory
  - `stackName` string, required
  - `renderable` boolean, required — False when the Compose model could not be rendered; declared provenance is then unknown.
  - `partial` boolean, required — A replica or its image could not be fully inspected.
  - `generatedAt` integer, required
  - `services` StackServiceLabelRow[], required
    - `service` string, required
    - `declaredLabels` LabelValue[], required
      - `key` string, required
      - `value` string, required — Redacted to `[redacted]` for secret-like keys unless the caller is an admin and passes `reveal=1`.
      - `source` 'compose' | 'runtime' | 'image' | 'compose-system' | 'unknown', required — Provenance of a label. `unknown` when a container or image could not be inspected.
      - `redacted` boolean
    - `replicas` StackLabelReplica[], required
      - `id` string, required
      - `name` string, required
      - `state` string, required
      - `runtimeLabels` LabelValue[], required
        - `key` string, required
        - `value` string, required — Redacted to `[redacted]` for secret-like keys unless the caller is an admin and passes `reveal=1`.
        - `source` 'compose' | 'runtime' | 'image' | 'compose-system' | 'unknown', required — Provenance of a label. `unknown` when a container or image could not be inspected.
        - `redacted` boolean
      - `onlyInCompose` string[], required
      - `onlyOnContainer` string[], required
      - `inBoth` string[], required
      - `changed` string[], required — Keys declared in Compose and present at runtime but with a different value.
      - `inspectFailed` boolean — Runtime labels could not be read for this replica; reconciliation was skipped.

## Other responses

- `403` — Insufficient permissions or license tier.
- `404` — Stack not found.
- `500` — Internal server error.

---

[API](https://skmtc.net/studio-saelix/apis/sencho-api.md) · [All operations](https://skmtc.net/studio-saelix/apis/sencho-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/studio-saelix/sencho-api/versions/f36f82acae1d/schema)
