Get your free beta license ↗
API operation · databases group
GET

/databases

First published 3 Oct 20260.1.0Unchanged since publication

List databases

Who may call it
AdministratorResellerCustomer
Token scope, any of
databasesreadall
Answers200 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

Run as root on the server

Parameters

userquery ·Username
Owner username for the basic listing, available to administrators and resellers within their permitted accounts.
qquery ·string, up to 200 characters
Search text matching a case-insensitive substring of the database name or the owner's full username.
ownerquery ·Username
Username of the owner whose databases to list.
over_1gbquery ·boolean
Filter for databases whose last measured size exceeded 1 GB (1024³ bytes) when true.
namequery ·DatabaseName
Exact database name, consisting of 1 to 64 ASCII letters, digits, or underscores.
pagequery ·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_pagequery ·integer, 1 to 1000
Number of databases per page in up to 4 decimal digits. Defaults to 25 when pagination is requested.

Example

See the API overview for how to set $API and $TOKEN.
Request
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

5 errors, each a status and a sentence
400A <what> name is 1 to 64 letters, digits or underscores
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
401Authentication required
404User '<family>' not found
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/get-databases/