# GET /databases

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

UrbeStack release 0.2.35 API operation in the databases group.

List databases

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

UrbeStack uses recorded ownership to determine visibility. Administrators can list all managed databases. Resellers can list their own databases and their customers' databases. Customers can list their own databases.

The basic listing returns databases ordered by name and supports the user filter for administrators and resellers. The detailed listing supports q, owner, over_1gb, and name. It orders databases by size, largest first, and includes each owner's package, the database users with access and their grant levels, and last_copy, the owner's newest nightly archive containing the database and created after the database was created.

For administrators, q, over_1gb=true, name, page, or per_page selects the detailed listing. Using owner alone filters the basic listing and returns more set to false. For resellers and customers, supplying any of q, owner, over_1gb, name, page, or per_page selects the detailed listing. Supply page or per_page to paginate. Omit both to return all matches.

The API ignores q values longer than 200 characters or containing ASCII control characters. It ignores page and per_page values outside their accepted decimal formats. An invalid name returns 400.

## As a command

- [urbestack-database-list](https://urbestack.com/docs/commands/urbestack-database-list.md): Lists databases by their recorded ownership in UrbeStack.

## Parameters

- `user` (query, Username): Owner username for the basic listing, available to administrators and resellers within their permitted accounts.
- `q` (query, string, up to 200 characters): Search text matching a case-insensitive substring of the database name or the owner's full username.
- `owner` (query, Username): Username of the owner whose databases to list.
- `over_1gb` (query, boolean): Filter for databases whose last measured size exceeded 1 GB (1024³ bytes) when true.
- `name` (query, DatabaseName): Exact database name, consisting of 1 to 64 ASCII letters, digits, or underscores.
- `page` (query, integer, 1 or more): Page number in up to 9 decimal digits, defaulting to 1. A number beyond the last page selects the last page.
- `per_page` (query, integer, 1 to 1000): Number of databases per page in up to 4 decimal digits. Defaults to 25 when pagination is requested.

## 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/databases?user=alice&q=text&owner=alice&over_1gb=1&name=alice&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "all": {
    "bytes": 1,
    "largest": {
      "name": "alice",
      "size_bytes": 1,
      "user": "alice"
    },
    "measured_at": "text",
    "over_1gb": 1,
    "over_1gb_bytes": 1,
    "owners": 1,
    "total": 1,
    "users": 1
  },
  "counts": {
    "all": 1,
    "over_1gb": 1
  },
  "databases": [
    {
      "created_at": "2026-09-09T10:15:00Z",
      "id": 1,
      "last_copy": {
        "day": "2026-09-09",
        "modified_at": "text"
      },
      "measured_at": "text",
      "name": "alice",
      "package": "basic",
      "size_bytes": 1,
      "user": "alice",
      "user_id": 2,
      "users": [
        {
          "level": "full",
          "name": "alice",
          "privileges": "text"
        }
      ]
    }
  ],
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "total": 1
}
```

## Errors

- 400: A <what> name is 1 to 64 letters, digits or underscores
- 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 '<family>' not found
