Server Databases
List databases
Retrieves all databases on a server
Available include parameters
| Parameter | Description |
|---|---|
| password | Includes the database user password |
| host | Information about the database host |
GET
/api/application/servers/{id}/databasesAuthorization
ApplicationToken AuthorizationBearer <token>
Application API key (generated at /admin/api)
In: header
Path Parameters
id*integer
Server ID (internal numeric ID)
Query Parameters
include?string
Comma-separated list of related resources to embed in each returned object. Accepted values are listed in the include-parameters table above.
Response Body
application/json
curl -X GET "https://pterodactyl.file.properties/api/application/servers/5/databases?include=password%2Chost" \ -H "Authorization: Bearer ptla_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Accept: application/json"{
"object": "list",
"data": [
{
"object": "server_database",
"attributes": {
"id": 1,
"server": 5,
"host": 4,
"database": "s5_perms",
"username": "u5_QsIAp1jhvS",
"remote": "%",
"max_connections": 0,
"created_at": "2020-06-12T23:00:13+01:00",
"updated_at": "2020-06-12T23:00:13+01:00",
"relationships": {
"password": {
"object": "database_password",
"attributes": {
"password": ".FjJ!5w945L3tuG4DrSxF+T@"
}
},
"host": {
"object": "database_host",
"attributes": {
"id": 4,
"name": "MariaDB",
"host": "127.0.0.1",
"port": 3306,
"username": "pterodactyluser",
"node": 1,
"created_at": "2020-06-12T22:59:25+01:00",
"updated_at": "2020-06-12T22:59:25+01:00"
}
}
}
}
},
{
"object": "server_database",
"attributes": {
"id": 2,
"server": 5,
"host": 4,
"database": "s5_coreprotect",
"username": "u5_2jtJx1nO1d",
"remote": "%",
"max_connections": 0,
"created_at": "2020-06-12T23:00:20+01:00",
"updated_at": "2020-06-12T23:00:20+01:00",
"relationships": {
"password": {
"object": "database_password",
"attributes": {
"password": "4=rv^0vHuOPSHCfj!tM1OlMC"
}
},
"host": {
"object": "database_host",
"attributes": {
"id": 4,
"name": "MariaDB",
"host": "127.0.0.1",
"port": 3306,
"username": "pterodactyluser",
"node": 1,
"created_at": "2020-06-12T22:59:25+01:00",
"updated_at": "2020-06-12T22:59:25+01:00"
}
}
}
}
}
]
}