---
title: "Get the Docker label inventory for the active node"
method: GET
path: "/api/system/container-labels"
tags: ["Fleet"]
---

# Get the Docker label inventory for the active node

`GET /api/system/container-labels`

Returns every container on the node with its labels and provenance (compose, image, runtime, compose-system, or unknown), plus an inverted `byLabel` index. Marks `partial` when a container or image inspect fails. Secret-like values are redacted unless the caller is an admin and passes `reveal=1`. Requires `node:read` permission.

## Query parameters

- `reveal` '1' | 'true'

## Headers

- `x-node-id` integer

## Response `200`

Node container label inventory.

- NodeLabelInventory
  - `nodeId` integer, required
  - `partial` boolean, required
  - `generatedAt` integer, required
  - `containers` ContainerLabelRow[], required
    - `id` string, required
    - `name` string, required
    - `stack` string, nullable, required
    - `service` string, nullable, required
    - `state` string, required
    - `labels` 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
  - `byLabel` LabelIndexRow[], required
    - `key` string, required
    - `value` string, required
    - `source` 'compose' | 'runtime' | 'image' | 'compose-system' | 'unknown', required — Provenance of a label. `unknown` when a container or image could not be inspected.
    - `redacted` boolean
    - `containers` LabelIndexContainerRef[], required
      - `id` string, required
      - `name` string, required
      - `stack` string, nullable, required
      - `service` string, nullable, required
      - `nodeId` integer
      - `nodeName` string

## Other responses

- `403` — Insufficient permissions or license tier.
- `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)
