Check whether an upload fits the storage plan
post
https://api.expiryedge.com/v1/checkUploadany role60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/checkUpload' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_size": 2097152
}'Antwort
{
"success": true,
"allowed": true,
"current_usage": 52428800,
"current_usage_formatted": "50 MB",
"limit": 1073741824,
"limit_formatted": "1 GB",
"file_size": 2097152,
"file_size_formatted": "2 MB"
}Call before uploading files. file_size is the total bytes of the planned upload (positive integer, max 524288000). Body organization_id and plan_name are ignored.
file_sizeintegererforderlichBytes to upload.min: 1 · max: 524288000
200
Whether the upload is allowed.
allowed is false (still 200) when it would exceed the limit.successbooleanallowedbooleanreasonstringPresent when not allowed (for exampleStorage limit exceeded).current_usageintegercurrent_usage_formattedstringlimitintegerlimit_formattedstringfile_sizeintegerfile_size_formattedstring
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | Authenticated, but your role or organization does not allow this action. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Unexpected server error. Retry later; quote requestId to support. |
