OpenFolia

Storage used

GET
/storage-usage

The storage this installation uses, per category: media (uploaded images and attachments) and archived PDFs (release outputs), which count towards the limit (CCMS_STORAGE_LIMIT_BYTES, none by default), and the Git content and the database for information. The totals move with every upload and delete and are counted afresh periodically (recountedAt); no store is counted on request. Needs the admin.roles permission.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Response Body

application/vnd.api+json
  1. response
data*

id is always instance.

Example Request
curl -X GET 'http://localhost:3000/storage-usage'
Example Response
{  "data": {    "type": "StorageUsage",    "id": "string",    "attributes": {      "media": {        "bytes": 0,        "files": 0      },      "archivedPdfs": {        "bytes": 0,        "files": 0      },      "gitContent": {        "bytes": 0      },      "database": {        "bytes": 0      },      "limitBytes": 1,      "recountedAt": "2019-08-24T14:15:22Z"    },    "meta": {      "usedBytes": 0,      "usedShare": 0,      "level": "unlimited",      "warnAt": 0    }  }}