List database users
GET /api/v2/shared-hosting/{accountId}/database-users
List the MySQL users on a web hosting account. databases names the databases each user can access. Link a user to a database with POST /api/v2/shared-hosting/{accountId}/database-users/{username}/privileges. Use id or username as {username} in the calls on one user. The hosts users may connect from are account-wide. See GET /api/v2/shared-hosting/{accountId}/database-access-hosts. The account must be active. An account on Hostup’s previous hosting platform returns an empty list.
Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/database-users" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 Database users.
{ "databaseUsers": [ { "id": "dbu_01hxa3b4c5d6e7f8g9h0j1k2m3", "username": "abcde_wp_exampleuser", "host": "localhost", "databases": [ "abcde_wp_example" ] } ]}Response fields
databaseUsersarray of objectidstringThe database user ID (
dbu_…).usernamestringThe MySQL user name.
hoststring or nullThe MySQL host the user is defined for, when reported.
databasesarray of stringThe databases this user can access.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | Conflict. code is account_suspended, account_not_eligible_cpanel. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |