Pterodactyl API v1
Databases

Rotate password

Changes the password of a specified database

POST/api/client/servers/{server}/databases/{database}/rotate-password

Authorization

ClientToken
AuthorizationBearer <token>

Client API key (generated at /account/api)

In: header

Path Parameters

server*string

Server identifier (short 8-character ID)

database*integer

Database ID

Response Body

application/json

curl -X POST "https://pterodactyl.file.properties/api/client/servers/1a7ce997/databases/1/rotate-password" \  -H "Authorization: Bearer ptlc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \  -H "Accept: application/json"
{
  "object": "server_database",
  "attributes": {
    "id": "y9YVxO4V",
    "host": {
      "address": "127.0.0.1",
      "port": 3306
    },
    "name": "s5_punishments",
    "username": "u5_aeZqbGdCM9",
    "connections_from": "%",
    "max_connections": 0,
    "relationships": {
      "password": {
        "object": "database_password",
        "attributes": {
          "password": "vnFKXlJ.p77!EiGR+Kd3muB."
        }
      }
    }
  }
}