Gamma API

Purge unreferenced files

POST
/api/organizations/{slug}/storage/orphans/purge

Deletes every listed unreferenced file from the organization's bucket, except any a record points at again. 404 when no storage is connected.

Who may call it: An owner or security admin of the organization. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Host- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

slug*string

The organization's slug, as in its URL.

Response Body

OK.

application/json
  1. response
files*number

How many files were deleted.

bytes*number

Their total size, in bytes.

Example Request
curl -X POST 'http://localhost:3000/api/organizations/string/storage/orphans/purge'
Example Response
{  "files": 0,  "bytes": 0}