Get storage usage and caps
GET
/user/storage
const url = 'https://api.engram.page/user/storage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.engram.page/user/storage \ --header 'Authorization: Bearer <token>'Returns the user’s current attachment storage usage and file count alongside the total storage cap and the per-file size limit resolved from their plan. On self-host (limits not enforced) the per-file cap is reported as the Pro ceiling.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Storage usage
Media typeapplication/json
StorageUsage
object
file_count
required
integer
max_attachment_bytes
required
Per-file cap for the user’s plan.
integer
max_bytes
required
integer
used_bytes
required
integer
Examplegenerated
{ "file_count": 1, "max_attachment_bytes": 1, "max_bytes": 1, "used_bytes": 1}