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

/databases/users

First published 3 Oct 20260.1.0Unchanged since publication

List database users and their grants

Who may call it
AdministratorResellerCustomer
Token scope, any of
databasesreadall
Answers200 OK

Administrators can list all managed database users. Resellers can list their own database users and their customers' database users. Customers can list their own. The response excludes phpMyAdmin sign-on users and password hashes.

The basic listing returns users and supports the user filter for administrators and resellers. For administrators, q, 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, page, or per_page selects the detailed listing. When MariaDB responds, the detailed listing includes other_hosts, the additional hosts under which each database user has a MariaDB account.

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.

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
Literal search text with surrounding whitespace removed. Matches a case-insensitive substring of the database user's name or of any database name it can access, or the owner's full username.
ownerquery ·Username
Username of the owner whose database users to list.
pagequery ·integer, 1 or more
Page number in up to 9 decimal digits. The default is 1, 0 selects the first page, and a number beyond the last page selects the last page.
per_pagequery ·integer, 1 to 1000
Number of database users per page, from 1 to 1000. 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/users?user=alice&q=text&owner=alice&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "all": {
    "total": 1
  },
  "more": true,
  "page": 1,
  "pages": 1,
  "per_page": 1,
  "total": 1,
  "users": [
    {
      "created_at": "2026-09-09T10:15:00Z",
      "grants": [
        {
          "database": "alice_shop",
          "level": "full",
          "privileges": "text"
        }
      ],
      "id": 1,
      "name": "alice",
      "other_hosts": [
        "text"
      ],
      "updated_at": "text",
      "user": "alice",
      "user_id": 2
    }
  ]
}

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-users/