PUT/quotas/users/{username}/usage

Update a user's disk quota usage

Updates the current disk quota usage for a specified user by setting exact values or adjusting the existing values. Use mode to choose between reset and add; it defaults to reset when omitted. Omitted usage values default to 0, with the effect depending on the selected mode.

2 parameters · 2 body fields
usernamestringrequired
The username whose disk quota usage to update.
modestringoptional
How to apply the supplied usage values: `add` increments or decrements current usage, while `reset` sets exact values. Defaults to `reset` when omitted.
Allowed:addreset

Disk quota usage values to set or adjust. Omitted used_quota_size and used_quota_files values default to 0; in add mode they leave the corresponding current value unchanged, while in reset mode they set it to 0.

used_quota_filesintegeroptional
The user's current quota usage as a file count.
used_quota_sizeintegeroptional
The user's current quota usage as a total size.

8 status codes
200Returns an object confirming the operation, with `error` and `message` fields.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
400Returned when the request is invalid.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Returned when the request is unauthorized.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Returned when access to the user's quota is forbidden.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
404Returned when the specified user is not found.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
409Returned when the update conflicts with the user's current state.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Returned when an internal server error occurs.
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty

Error handling

A 400 is returned when the request is invalid. A 401 is returned when authentication is missing or invalid. A 403 is returned when access is forbidden. A 404 is returned when the user is not found. A 409 is returned when the update conflicts with the user's current state. A 500 is returned when an internal server error occurs. The username path parameter identifies the user, and the mode query parameter accepts add or reset and defaults to reset when omitted. If used_quota_size or used_quota_files is omitted, it defaults to 0; in add mode the current value remains unchanged, while in reset mode it is set to 0.