---
title: "Admin Sweep Media Assets"
method: POST
path: "/admin/media-assets/gc"
tags: ["admin"]
---

# Admin Sweep Media Assets

`POST /admin/media-assets/gc`

Two-pass GC sweep over `workspace-media`; see the service docstring
for the pass semantics and accepted races.

The body is optional so a bare POST (no body at all, the careless manual
call) lands on the dry-run default instead of a 422.

## Request body

- MediaAssetsSweepRequest
  - `dry_run` boolean

## Response `200`

Successful Response

- MediaAssetsSweepResponse
  - `dry_run` boolean, required
  - `candidates` MediaAssetRef[], required
    - `asset_id` string, required
    - `storage_path` string, required
  - `orphan_objects` string[], required
  - `rows_without_objects` MediaAssetRef[], required
    - `asset_id` string, required
    - `storage_path` string, required
  - `deleted_asset_count` integer, required
  - `skipped_candidate_count` integer, required
  - `deleted_orphan_count` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/useauxos/apis/auxos.md) · [All operations](https://skmtc.dev/useauxos/apis/auxos/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/useauxos/auxos/revisions/2f853c0b59f4/schema)
