List account databases
Returns a paginated list of databases for the specified account. Use the domain and isassigned filters to find databases assigned to a specific domain.
Returns a paginated list of databases for the specified account.
Use the domain and is_assigned filters to find databases assigned to a specific domain.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
usernamestringRequiredExample:
u123456789Query parameters
pageintegerOptionalExample:
Page number
1per_pageinteger · max: 100OptionalDefault:
Number of items per page
25Example: 25domainstring · nullableOptionalExample:
Filter by domain name (case-insensitive substring match)
example.comis_assignedboolean · nullableOptionalExample:
When used with domain, return only databases assigned to that domain.
truesearchstring · max: 512 · nullableOptionalExample:
Search databases by name, user, or creation date.
test_dbResponses
200
Success response
application/json
401
Unauthenticated response
application/json
500
Error response
application/json
get/api/hosting/v1/accounts/{username}/databases
GET /api/hosting/v1/accounts/{username}/databases HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"name": "u123456789_test_db",
"user": "u123456789_admin",
"domain": "example.com",
"permissions": {
"Alter": 1,
"Drop": 0
},
"created_at": "2024-05-29T05:49:49+00:00",
"updated_at": "2024-05-29T05:49:49+00:00",
"disk_usage_mb": 32,
"max_size_mb": 3072,
"host": "srv1517.hstgr.io",
"port": 3306
}
],
"meta": {
"current_page": 1,
"per_page": 15,
"total": 100
}
}Last updated
Was this helpful?