# GET /users/{name}/disk

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the users group.

Get a customer's disk usage and package limit

- Who may call it: administrator, reseller, customer
- Token scope, any of: users, read, all
- Answers: 200 OK

The response includes home directory usage, database usage, and the package's disk limit. It identifies the filesystem that contains the home directories and reports whether the kernel enforces disk quotas on it.

UrbeStack reads home directory usage from the kernel when disk quotas are enabled and uses the last nightly measurement otherwise. Database usage always comes from the last nightly measurement.

Customers can request their own usage, resellers can request usage for their customers, and administrators can request usage for any customer. Requests for an administrator's disk usage are rejected because administrators have no home directory.

## As a command

- [urbestack-disk-usage](https://urbestack.com/docs/commands/urbestack-disk-usage.md): Reports customer disk usage against the limits set by their packages.

## Parameters

- `name` (path, Username, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/users/alice/disk" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "quota": {
    "checked_at": "text",
    "fstype": "text",
    "on": 1,
    "pending_reboot": 1,
    "target": "https://example.com/new",
    "unknown": 1
  },
  "usage": {
    "bytes": 1,
    "database_bytes": 1,
    "home_bytes": 1,
    "limit_bytes": 1,
    "measured_at": "text",
    "name": "alice",
    "over": 1,
    "package": "basic",
    "percent": 1,
    "quota": "kernel"
  }
}
```

## Errors

- 400: <user.name> is an administrator: administrators have no home
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: User '<name>' not found
