---
title: "What the host's nightly cleanup removed, kept or failed to remove (leftovers of deleted projects, unused volumes and networks, old snapshots), newest first"
method: GET
path: "/operator/host-cleanup"
tags: ["Operator"]
---

# What the host's nightly cleanup removed, kept or failed to remove (leftovers of deleted projects, unused volumes and networks, old snapshots), newest first

`GET /operator/host-cleanup`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/operator/host-cleanup`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Query parameters

- `limit` integer
- `offset` integer, nullable

## Response `200`

Cleanup log

- object
  - `generatedAt` string, required: ISO-8601 timestamp
  - `agents` object[], required
    - `agent` 'final-backups' | 'cleanup', required
    - `host` string, required
    - `version` string, required
    - `lastSeenAt` string, required: ISO-8601 timestamp
    - `details` object, required
  - `lastWeek` object, required
    - `removed` integer, required
    - `failed` integer, required
    - `kept` integer, required
    - `bytesFreed` integer, required
    - `lastRunAt` string, nullable, required: ISO-8601 timestamp
  - `items` object[], required: newest first
    - `runId` string, uuid, required
    - `ranAt` string, required: ISO-8601 timestamp
    - `category` 'deleted_resource' | 'unused_volume' | 'empty_network' | 'snapshot_scrub' | 'final_backup_forgotten', required
    - `action` 'removed' | 'would_remove' | 'kept' | 'failed', required
    - `target` string, required: what it is about: the engine id of a deleted project, a volume or network name, a snapshot id
    - `detail` string, required
    - `bytes` integer, nullable, required

## Other responses

- `403`: Not a platform operator, a bearer-authenticated request, or a session older than 5 minutes (code forbidden; details.reauthenticate is true for the last case)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
