Skip to main content
POST
Clean up unused images
Removes unused sandbox image versions across the selected team. Versions referenced by active deployments remain available. Cleanup can delete unused versions saved for future deployments. To remove only one version or repository, use targeted deletion.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Headers

X-Team-Id
string

Optional team ID. Must match the team_id query parameter when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.

Minimum string length: 1

Query Parameters

team_id
string

Optional team ID. Must match X-Team-Id when both are supplied. If neither selector is supplied, defaults to the caller's only accessible team. Callers with multiple accessible teams must select a team. Requests without access to any team are forbidden.

Minimum string length: 1

Response

Successful operation.

Result of cleaning up unused sandbox images.

deleted
integer
required

Number of image versions removed.

Required range: x >= 0
Example:

3

message
string
required

Human-readable cleanup result.

Example:

"Removed 3 unused image versions. Image versions used by active sandboxes were retained."