# GET /databases/orphans

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the databases group.

List unowned MariaDB databases and accounts unknown to UrbeStack

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

Only administrators can call this operation. Other callers receive 403.

The operation queries MariaDB directly. It returns databases with no recorded owner, including their sizes and oldest table creation times, and accounts unknown to UrbeStack, including their grants. If MariaDB cannot be queried, the response returns 200 with empty databases and accounts arrays and includes server_error.

## As a command

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

## 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/orphans" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "accounts": [
    {
      "grants": [
        "text"
      ],
      "host": "text",
      "user": "alice"
    }
  ],
  "databases": [
    {
      "first_table_at": "text",
      "name": "alice",
      "size_bytes": 1
    }
  ],
  "server_error": "text"
}
```

## Errors

- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 403: Insufficient privileges
- 404: User '<family>' not found
