https://api.nodemaven.com/api/v2/base/ and carry the header Authorization: x-api-key YOUR_API_KEY. See the NodeMaven API overview for the shared basics.
Endpoints
Creating a sub-user
SubUserCreateRequest:
Traffic limits are in bytes, not GB
traffic_limit, used_traffic and traffic_limit_increment_bytes are all measured in bytes.
Sending 10 does not mean 10 GB. It means 10 bytes.
To save you the arithmetic:
A binary gigabyte is 1024³ bytes and a decimal gigabyte is 1000³ bytes.
Updating a sub-user
SubUserUpdateRequest:
For example, to raise a sub-user’s limit without needing to know what it currently is, send a positive
traffic_limit_increment_bytes and omit traffic_limit entirely. To claw some back, send a negative value. Use the byte figures from the table above.
Deleting a sub-user
DELETE /sub-users/ takes the sub-user’s id as a query parameter, not in a body. The id is a uuid and it is required.
A 404 means there is no sub-user with that ID.
Resetting usage
SubUserResetUsageRequest takes one field:
Because
ids is an array, one call resets several sub-users at once. You do not need to loop.
Related reading
- Sub-users covers what sub-users are for and how to manage them in the dashboard.