client.account

client.servers

class pydactyl.api.client.servers.base.ServersBase

Pterodactyl Client Server Base API.

Methods in this class appear in the base client.servers namespace when using PterodactylClient.

get_server(server_id, detail=False, includes=None, params=None)

Get information for the specified server.

Parameters:
  • server_id (str) – Server identifier (abbreviated UUID)

  • detail (bool) – If True includes the object type and a nested data structure. This is not particularly useful.

  • includes (iter) – List of includes, e.g. (‘egg’, ‘subusers’)

  • params (dict) – Extra parameters to pass, e.g. {‘per_page’: 300}

get_server_utilization(server_id, detail=False)

Get resource utilization information for the specified server.

Parameters:
  • server_id (str) – Server identifier (abbreviated UUID)

  • detail (bool) – If True includes the object type and a nested data structure. This is not particularly useful.

get_websocket(server_id)

Generates credentials to connect to the server’s websocket.

Parameters:

server_id (str) – Server identifier (abbreviated UUID)

Returns:

Response with token and websocket address

Return type:

response(dict)

list_permissions()

Retries all available permissions.

This is used by the frontend. I have no idea what this does.

list_servers(includes=None, params=None)

List all servers the client has access to.

Parameters:
  • includes (iter) – List of includes, e.g. (‘egg’, ‘subusers’)

  • params (dict) – Extra parameters to pass, e.g. {‘per_page’: 300}

send_console_command(server_id, cmd)

Sends a console command to the specified server.

The server must be online, otherwise API will return a HTTP 412 error. If successful, there will be an empty response body.

Parameters:
  • server_id (str) – Server identifier (abbreviated UUID)

  • cmd (str) – Console command to send to the server

send_power_action(server_id, signal)

Sends a console command to the specified server.

The server must be online, otherwise API will return a HTTP 412 error. If successful, there will be an empty response body.

Parameters:
  • server_id (str) – Server identifier (abbreviated UUID)

  • signal (str) –

    Power signal to send to the server. Valid options: start - Sends the startup command to the server. stop - Sends the stop command to the server. restart - Stops the server then immediately starts it. kill - Instantly ends all processes and marks the server as

    stopped. The kill signal can corrupt server files and should only be used as a last resort.

client.servers.backups

client.servers.databases

client.servers.files

client.servers.network

client.servers.settings

client.servers.startup

client.servers.users