Pterodactyl API v1
Server Databases

Create database

Creates a new database on the specified server

POST/api/application/servers/{id}/databases

Authorization

ApplicationToken
AuthorizationBearer <token>

Application API key (generated at /admin/api)

In: header

Path Parameters

id*integer

Server ID (internal numeric ID)

Request Body

application/json

database*string

Name for database

remote*string

Permitted remotes that can access the database

host*integer

ID of the database host to use

Response Body

application/json

curl -X POST "https://pterodactyl.file.properties/api/application/servers/5/databases" \  -H "Authorization: Bearer ptla_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \  -H "Accept: application/json" \  -H "Content-Type: application/json" \  -d '{  "database": "matches",  "remote": "%",  "host": 4}'
{
  "object": "server_database",
  "attributes": {
    "id": 6,
    "server": 5,
    "host": 4,
    "database": "s5_matches",
    "username": "u5_LhG3aGWBtk",
    "remote": "%",
    "max_connections": null,
    "created_at": "2020-11-04T21:00:42+00:00",
    "updated_at": "2020-11-04T21:00:42+00:00"
  },
  "meta": {
    "resource": "https://pterodactyl.file.properties/api/application/servers/5/databases/6"
  }
}