Admin endpoints let platform administrators manage user accounts and control storage quota allocation through the Ethereum storage contract. These endpoints are gated by a server-side role check: the session user must have theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ankit-bista/Final-Project/llms.txt
Use this file to discover all available pages before exploring further.
admin role.
GET /api/admin/users
Returns all registered users with their computed storage usage.Internal user ID.
Display username, or
null if the user has not set one.Ethereum wallet address (lowercase).
Current platform role:
admin, uploader, or commenter. Unrecognized role strings are normalized to commenter.Total bytes consumed across all files owned by this user.
Storage usage is computed on the fly by summing file sizes in the database. It does not reflect on-chain quota stats — use
GET /blockchain/quota for contract-level data.POST /api/admin/users/:id/access
Sets the role and storage quota for a user. Both fields are optional — supply only the ones you want to change.Numeric ID of the user to update.
New platform role:
admin, uploader, or commenter. Any other value is normalized to commenter.New storage quota in bytes. Set to
0 to use the platform default.Always
true.The updated user record.
400 invalid user ID, 404 user not found.
DELETE /api/admin/users/:id
Permanently deletes a user account and all associated data.Numeric ID of the user to delete.
404 user not found.
POST /api/admin/pool/allocate
Creates or tops up a named storage pool on the Ethereum storage allocation contract. Pools group a bucket of bytes that can be distributed to users.Unique name for the storage pool (e.g.
free-tier, enterprise-q3).Number of bytes to allocate to the pool.
400 missing poolName or bytesAmount, 500 blockchain transaction failure.
Pool allocation requires
USE_REAL_CONTRACTS=true and a funded admin signing key configured via RPC_URL and STORAGE_ALLOC_CONTRACT environment variables. In mock mode the call succeeds but does not submit a transaction.POST /api/admin/quota/allocate
Assigns storage quota to a specific user wallet from an existing pool. The user’s on-chain quota is updated and subsequent uploads enforce the new limit whenENFORCE_QUOTA_ON_UPLOAD=true.
Name of the pool to draw bytes from.
Ethereum wallet address of the user receiving the quota.
Number of bytes to allocate from the pool to the user.
400 missing required fields, 500 blockchain transaction failure.