Pterodactyldocs
Admin A P I

Get server database

Returns a single database assigned to a server.

GET/api/admin/servers/{server_admin_identifier}/databases/{database_id}
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

Path Parameters

server_admin_identifier*string

The server ID or UUID.

database_id*string

The database ID.

Query Parameters

include?"password"

Comma-separated relationships to include. Supports "password".

Value in

  • "password"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/admin/servers/1/databases/Lk3jx4pQ?include=password"
{  "object": "server_database",  "attributes": {    "id": "kB0dVl28",    "host": {      "address": "15.159.33.109",      "port": 3306    },    "name": "jcPmkfpoBm",    "username": "AQ4MUxEC4L",    "connections_from": "%",    "max_connections": 0,    "relationships": {      "password": {        "object": "database_password",        "attributes": {          "password": "test123"        }      }    }  },  "meta": {    "resource": "https://panel.example.com/api/admin/servers/1/databases/Lk3jx4pQ"  }}