---
title: "Audit asset namespace invariants"
method: GET
path: "/api/assets/key-audit"
tags: ["Assets"]
---

# Audit asset namespace invariants

`GET /api/assets/key-audit`

Operator-only check for structural key validity, personal-user references, and logical provider mapping drift. Repeated logical keys are valid and are never reported as conflicts.

## Response `200`

Asset namespace audit result

- object
  - `ok` boolean, required
  - `structuralValid` boolean, required
  - `checked` integer, required
  - `fatalCount` integer, required
  - `warningCount` integer, required
  - `issues` object[], required
    - `severity` 'fatal' | 'warning', required
    - `code` 'missing-key' | 'noncanonical-key' | 'unknown-personal-user' | 'missing-provider-mapping' | 'provider-mapping-drift', required
    - `entityType` 'task' | 'workflow' | 'schedule' | 'page' | 'app' | 'script' | 'file', required
    - `entityId` string, required
    - `message` string, required

## Other responses

- `403` — Operator access required

## Changes

- **2026-08-08** `ef761849166b` — 2 warning
  - added the new `app` enum value to the `issues/items/entityType` response property for the response status `200`
  - added the new `script` enum value to the `issues/items/entityType` response property for the response status `200`
- **2026-08-07** `06cac6a7c5bc` — 2 info
  - added the media type `application/json` for the response with the status `200`
  - added the media type `application/json` for the response with the status `403`
- **2026-07-11** `f1022d5edb0d` — 1 info
  - endpoint added
- **2026-07-02** `0c910612f9ac` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/assets/key-audit/get.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/8cde933218b5/schema)
