Pterodactyldocs
Admin A P I

List database hosts

Returns a paginated list of database hosts.

GET/api/admin/database-hosts
AuthorizationBearer <token>

Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.

In: header

Query Parameters

page?integer

Page number to retrieve.

per_page?integer

Results to return per page.

filter[name]?string

Filter hosts by name.

filter[host]?string

Filter hosts by address or hostname.

sort?string

Sort hosts by ID, name, or creation date. Prefix with a hyphen for descending order.

include?string

Comma-separated relationships to include. Supports node and databases.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/admin/database-hosts?page=1&per_page=50&filter%5Bname%5D=Primary&filter%5Bhost%5D=127.0.0.1&sort=-created_at&include=node"
{  "object": "list",  "data": [    {      "object": "database_host",      "attributes": {        "id": 1554,        "name": "LightPink",        "host": "33.150.237.51",        "port": 3306,        "username": "Gold",        "max_databases": 50,        "databases_count": 0,        "node_id": 1,        "created_at": "2026-09-22T14:45:26+00:00",        "updated_at": "2026-09-22T14:45:26+00:00",        "relationships": {          "node": {            "object": "node",            "attributes": {              "id": 13380,              "uuid": "0c8baf15-4a20-49b5-b738-109796b553e1",              "public": true,              "name": "FactoryNode_K98YXFAsPq",              "description": "string",              "location_id": 16046,              "fqdn": "74.174.140.253",              "scheme": "http",              "behind_proxy": false,              "maintenance_mode": false,              "memory": 1024,              "memory_overallocate": 0,              "disk": 10240,              "disk_overallocate": 0,              "upload_size": 100,              "daemon_listen": 8080,              "daemon_sftp": 2022,              "daemon_base": "/var/lib/pterodactyl/volumes",              "created_at": "2026-09-22T14:45:25+00:00",              "updated_at": "2026-09-22T14:45:25+00:00",              "servers_count": 0,              "allocated_resources": {                "memory": 0,                "disk": 0              },              "relationships": {                "location": {                  "object": "location",                  "attributes": {                    "id": 16053,                    "short": "yXYh3ig7",                    "long": "DtTf5dbTXXUq1fV3VBHWMKFch7pKkxN4",                    "nodes_count": 0,                    "servers_count": 0,                    "created_at": "2026-09-22T14:45:26+00:00",                    "updated_at": "2026-09-22T14:45:26+00:00",                    "relationships": {                      "nodes": {                        "object": "list",                        "data": [                          {}                        ]                      }                    }                  },                  "meta": {                    "resource": "https://panel.example.com/api/admin/locations/1"                  }                }              }            },            "meta": {              "resource": "https://panel.example.com/api/admin/nodes/1"            }          },          "databases": {            "object": "list",            "data": [              {                "object": "database",                "attributes": {                  "server": {                    "id": 1,                    "name": "Survival"                  },                  "name": "s1_database",                  "username": "u1_database",                  "connections_from": "%",                  "max_connections": 0                }              }            ]          }        }      },      "meta": {        "resource": "https://panel.example.com/api/admin/database-hosts/1"      }    }  ],  "meta": {    "pagination": {      "total": 1,      "count": 1,      "per_page": 50,      "current_page": 1,      "total_pages": 1,      "links": {        "property1": "string",        "property2": "string"      }    }  }}