### Get Remote Server Installation Information Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/remote/server_installation.md Retrieves the installation script and container details for a remote server. This endpoint is used to get information needed to set up or reinstall a server. ```json { "container_image": "openjdk:8-jdk-slim", "entrypoint": "bash", "script": "# Installation script here" } ``` -------------------------------- ### Get Remote Server Installation Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/remote/server_installation.md Retrieves the installation information for a specific server. ```APIDOC ## GET /api/remote/servers/:uuid/install ### Description Returns installation information for a server. ### Method GET ### Endpoint /api/remote/servers/:uuid/install ### Responses #### Success Response (200) - The request was successful. #### Error Response (404) - The server was not found. ### Response Example ```json { "container_image": "openjdk:8-jdk-slim", "entrypoint": "bash", "script": "# Installation script here" } ``` ``` -------------------------------- ### Trigger Server Install Source: https://github.com/devnote-dev/ptero-notes/blob/main/wings/server.md Triggers the installation process for a server. ```APIDOC ## POST /api/servers/:uuid/install ### Description Triggers the install process of a server and returns no content. ### Method POST ### Endpoint /api/servers/:uuid/install ``` -------------------------------- ### Get Server Startup Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/README.md Retrieves the startup configuration for a server. ```APIDOC ## GET /api/client/servers/{server_id}/startup ### Description Retrieves the startup configuration for a server. ### Method GET ### Endpoint /api/client/servers/{server_id}/startup ### Parameters #### Path Parameters - **server_id** (string) - Required - The unique identifier of the server. ### Response #### Success Response (200) - **startup** (string) - The startup command for the server. - **threads** (boolean) - Whether the server uses threads. - **egg_features** (object) - Features enabled for the Egg. #### Response Example { "startup": "java -Xms1024M -Xmx1024M -jar server.jar", "threads": true, "egg_features": { "docker_images": { "default": "quay.io/pterodactyl/core:java" } } } ``` -------------------------------- ### Example JSON Response for File Listing Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/files.md This is an example of the JSON response when listing files in a server directory. It includes file metadata such as name, permissions, size, and type. ```json { "data": [ { "object": "file_object", "attributes": { "name": "example_file.txt", "mode": "755", "mode_bits": "rwxr-xr-x", "size": 1024, "is_file": true, "is_symlink": false, "mimetype": "text/plain", "created_at": "2023-06-10T08:30:00Z", "modified_at": "2023-06-10T10:15:00Z" } } ] } ``` -------------------------------- ### Get Nests API Response Example Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/nests-eggs.md Example JSON response when requesting a list of nests. Includes nest details like author, description, and ID. ```json { "object": "list", "data": [ { "object": "nest", "attributes": { "author": "support@pterodactyl.io", "created_at": "2022-01-03T08:07:20+00:00", "description": "Minecraft - the classic game from Mojang. With support for Vanilla MC, Spigot, and many others!", "id": 1, "name": "Minecraft", "updated_at": "2022-01-03T08:07:20+00:00", "uuid": "535d963e-9eed-4145-8f10-151cf625211e" } } ] } ``` -------------------------------- ### Get Specific Egg Configuration Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Fetches a detailed configuration for a specific egg, including its Docker image, startup command, file parsing rules, and installation script. Use `include` to retrieve related data. ```bash curl "https://panel.example.com/api/application/nests/1/eggs/1?include=config,variables,script" \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" ``` -------------------------------- ### Create Server Source: https://github.com/devnote-dev/ptero-notes/blob/main/wings/system.md Creates a new server on the node and initiates its installation process. Requires server identification and start-up preferences. ```APIDOC ## POST /api/servers ### Description Creates a server on the node and begins the installation process for it. ### Method POST ### Endpoint /api/servers ### Parameters #### Request Body - **uuid** (string) - Required - The UUID of the server in the panel. - **start_on_completion** (boolean) - Required - Whether the server should start once it is installed. ### Responses #### Success Response (204) The request was accepted. #### Error Response (400) The request body could not be parsed. #### Error Response (422) The request body could not be validated. ``` -------------------------------- ### Get All Users - Example Response Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/users.md This JSON structure represents the response when fetching a list of users. It includes pagination details and an array of user objects, each with their attributes. ```json { "object": "list", "data": [ { "object": "user", "attributes": { "2fa": false, "created_at": "2022-09-15T17:33:34+00:00", "email": "example@example.com", "external_id": null, "first_name": "test", "id": 4, "language": "en", "last_name": "user", "root_admin": true, "updated_at": "2022-09-15T17:33:35+00:00", "username": "test-user", "uuid": "4c45016d-0148-4794-89b6-970e0b429b54" } } ] } ``` -------------------------------- ### Get Nest API Response Example Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/nests-eggs.md Example JSON response when requesting a single nest by its ID. Returns detailed attributes of the specified nest. ```json { "object": "nest", "attributes": { "author": "support@pterodactyl.io", "created_at": "2022-01-03T08:07:20+00:00", "description": "Minecraft - the classic game from Mojang. With support for Vanilla MC, Spigot, and many others!", "id": 1, "name": "Minecraft", "updated_at": "2022-01-03T08:07:20+00:00", "uuid": "535d963e-9eed-4145-8f10-151cf625211e" } } ``` -------------------------------- ### Example Plain Text Body for Writing File Content Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/files.md This is an example of the plain text content that can be sent in the request body to write to a file on the server. The content can be in any format, but text/plain is common. ```text This is the content of a file with a .txt extension. ``` -------------------------------- ### Get Account Details Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Fetches the current user's account information. This is a basic GET request to retrieve account data. ```bash curl https://panel.example.com/api/client/account \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" ``` -------------------------------- ### Example JSON Body for Compressing Files Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/files.md This JSON body specifies the root directory and a list of files to be compressed on the server. ```json { "root": "/", "files": ["bungeecord.jar", "config.yml"] } ``` -------------------------------- ### Enable Two-Factor Authentication (2FA) Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Initiates the 2FA setup process by first retrieving the QR code data and secret, then submitting the TOTP code and password to complete activation. Recovery tokens are provided on success. ```bash curl https://panel.example.com/api/client/account/two-factor \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" ``` ```bash curl -X POST https://panel.example.com/api/client/account/two-factor \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"code": "123456", "password": "my-account-password"}' ``` -------------------------------- ### Get Server Startup Information Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/startup.md Retrieves all startup variables for a specific server. This includes default values, current server values, and configuration rules. ```json { "object": "list", "data": [ { "object": "egg_variable", "attributes": { "name": "Server Jar File", "description": "The name of the server jarfile to run the server with.", "env_variable": "SERVER_JARFILE", "default_value": "server.jar", "server_value": "server.jar", "is_editable": true, "rules": "required|regex:/^([\w\d._-]+)(\.jar)$/" } } ], "meta": { "startup_command": "java -Xms128M -Xmx512M -jar server.jar", "raw_startup_command": "java -Xms128M -Xmx{{ SERVER_MEMORY }}M -jar {{ SERVER_JARFILE }}", "docker_images": [] } } ``` -------------------------------- ### Example JWT Payload Source: https://github.com/devnote-dev/ptero-notes/blob/main/wings/jwt.md This is an example of a complete JWT, including the encoded payload, header, and signature. It is used for the GET /download/file endpoint. ```text eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjFhMjM0NTY3ODliMGNkZTEyM2Y0NTZnNzhoOTAxMjM0In0.eyJpc3MiOiJodHRwOi8vMTI3LjAuMC4xIiwiYXVkIjpbImh0dHA6Ly8xMjcuMC4wLjE6ODA4MCJdLCJqdGkiOiIxYTIzNDU2Nzg5YjBjZGUxMjNmNDU2Zzc4aDkwMTIzNCIsImlhdCI6MTY4Njc5NzQzNCwibmJmIjoxNjg2Nzk3MTM0LCJleHAiOjE2ODY3OTgzMzQsImZpbGVfcGF0aCI6Ii9zZXJ2ZXIucHJvcGVydGllcyIsInNlcnZlcl91dWlkIjoiMTIzNGE1NjctODliMC0xY2QyLTM0NTYtNzg5MGVmMTIzNDVnIiwidXNlcl91dWlkIjoiMWEyYmMzNGQtNTY3ZS04ZjkwLWcxaGktMjM0ajU2a2w3OG1uIiwidXNlcl9pZCI6MSwidW5pcXVlX2lkIjoiQ3lwZmZMcDB3RTBXdjAwNCJ9.zQkWBDuk05cuKZlmE5mfCdJSCZ4TY48siRFXZYLkpjY ``` -------------------------------- ### Example Endpoint Documentation Source: https://github.com/devnote-dev/ptero-notes/blob/main/CONTRIBUTING.md Illustrates the documentation structure for a specific endpoint, showing the HTTP method, path, and a brief description. ```markdown ## Update User ### `PATCH /api/application/users/:id` Updates a user by its `id`. Note that this is the numeric ID, not the string identifier or external identifier. ``` -------------------------------- ### Get Specific Location API Response Example Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/locations.md Example JSON response when retrieving a single location by its ID. The response contains the attributes of the specified location. ```json { "object": "location", "attributes": { "created_at": "2022-02-15T06:35:34+00:00", "id": 1, "long": "london", "short": "gb", "updated_at": "2022-02-15T06:58:30+00:00" } } ``` -------------------------------- ### Create a Daily Restart Schedule Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Create a new scheduled task. This example sets up a daily restart at 4:00 AM. You can configure various cron-like parameters and specify if the task should only run when the server is online. ```bash curl -X POST https://panel.example.com/api/client/servers/1a7ce997/schedules \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "name": "Daily Restart", "minute": "0", "hour": "4", "day_of_month": "*", "month": "*", "day_of_week": "*", "is_active": true, "only_when_online": false }' ``` -------------------------------- ### Get Locations API Response Example Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/locations.md Example JSON response when retrieving a list of locations via the API. This includes a list of location objects, each with its attributes. ```json { "object": "list", "data": [ { "object": "location", "attributes": { "created_at": "2022-02-15T06:35:34+00:00", "id": 1, "long": "london", "short": "gb", "updated_at": "2022-02-15T06:58:30+00:00" } } ] } ``` -------------------------------- ### Get Users Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/users.md Retrieves a list of all users on the Pterodactyl installation. Supports filtering, inclusion of related data, sorting, and pagination. ```APIDOC ## GET /api/application/users ### Description Returns a list of user objects. Supports filtering, inclusion of related data, sorting, and pagination. ### Method GET ### Endpoint /api/application/users ### Parameters #### Query Parameters - **filter** (string) - Optional - Allows filtering users by key-value pairs such as `email=example@example.com` or `username=test-user`. - **include** (array[string]) - Optional - Includes related data in the response, such as `servers`. - **sort** (string) - Optional - Sorts the results by `id` or `uuid`. - **page** (number) - Optional - Specifies the page number for pagination. Must be >= 1. - **per_page** (number) - Optional - Specifies the number of results per page. Must be >= 1. ### Response #### Success Response (200) - **object** (string) - Indicates the type of the returned object, which is 'list'. - **data** (array) - An array of user objects. - **object** (string) - Indicates the type of the object, which is 'user'. - **attributes** (object) - Contains the user's attributes. - **2fa** (boolean) - Whether two-factor authentication is enabled. - **created_at** (string) - The timestamp when the user was created. - **email** (string) - The email address of the user. - **external_id** (string|null) - The external ID of the user, if any. - **first_name** (string) - The first name of the user. - **id** (number) - The unique identifier of the user. - **language** (string) - The user's preferred language. - **last_name** (string) - The last name of the user. - **root_admin** (boolean) - Whether the user is a root administrator. - **updated_at** (string) - The timestamp when the user was last updated. - **username** (string) - The username of the user. - **uuid** (string) - The unique UUID of the user. ### Response Example ```json { "object": "list", "data": [ { "object": "user", "attributes": { "2fa": false, "created_at": "2022-09-15T17:33:34+00:00", "email": "example@example.com", "external_id": null, "first_name": "test", "id": 4, "language": "en", "last_name": "user", "root_admin": true, "updated_at": "2022-09-15T17:33:35+00:00", "username": "test-user", "uuid": "4c45016d-0148-4794-89b6-970e0b429b54" } } ] } ``` ``` -------------------------------- ### Reinstall Server Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/settings.md Reinstalls the server on the daemon. ```APIDOC ## POST /api/client/servers/:id/settings/reinstall ### Description Reinstalls the server on the daemon. ### Method POST ### Endpoint /api/client/servers/:id/settings/reinstall ### Responses #### Success Response (202) - The request was accepted. ``` -------------------------------- ### Create Server Backup Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/backups.md Initiates the creation of a new backup for a server. You can specify a name, a list of files to ignore, and whether the backup should be locked upon creation. ```json { "name": "backup-20210611", "ignored": "*.log,temp/*", "is_locked": false } ``` -------------------------------- ### Get Specific User - Example Response Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/users.md This JSON structure represents the response when fetching a single user by their ID. It details the attributes of the requested user. ```json { "object": "user", "attributes": { "2fa": false, "created_at": "2022-09-15T17:33:34+00:00", "email": "example@example.com", "external_id": null, "first_name": "test", "id": 4, "language": "en", "last_name": "user", "root_admin": true, "updated_at": "2022-09-15T17:33:35+00:00", "username": "test-user", "uuid": "4c45016d-0148-4794-89b6-970e0b429b54" } } ``` -------------------------------- ### Parameter Table Example Source: https://github.com/devnote-dev/ptero-notes/blob/main/CONTRIBUTING.md Illustrates the structure for defining parameters in API requests. Each field specifies its name, visibility, type, and a brief description. ```markdown | Field | Visibility | Type | Description | | -------------- | --------------- | ---------- | -------------------- | | the field name | visibility kind | value type | A short description. | ``` -------------------------------- ### Example Nest Egg Response Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/nests-eggs.md This JSON object represents a detailed structure of a Pterodactyl Nest Egg, including configuration, installation scripts, and Docker image information. ```json { "object": "list", "data": [ { "object": "egg", "attributes": { "author": "support@pterodactyl.io", "config": { "extends": null, "file_denylist": [], "files": { "config.yml": { "find": { "listeners[0].host": "0.0.0.0:{{server.build.default.port}}", "listeners[0].query_port": "{{server.build.default.port}}", "servers.*.address": { "regex": "^(127\\.0\\.0\\.1|localhost)(:\\d{1,5})?$": "{{config.docker.interface}}$2" } }, "parser": "yaml" } }, "logs": [], "startup": { "done": "Listening on " }, "stop": "end" }, "created_at": "2022-01-03T08:07:20+00:00", "description": "...", "docker_image": "ghcr.io/pterodactyl/yolks:java_17", "docker_images": { "Java 11": "ghcr.io/pterodactyl/yolks:java_11", "Java 16": "ghcr.io/pterodactyl/yolks:java_16", "Java 17": "ghcr.io/pterodactyl/yolks:java_17", "Java 8": "ghcr.io/pterodactyl/yolks:java_8" }, "id": 1, "name": "Bungeecord", "nest": 1, "script": { "container": "ghcr.io/pterodactyl/installers:alpine", "entry": "ash", "extends": null, "install": "#!/bin/ash\r\n# Bungeecord Installation Script\r\n#\r\n# Server Files: /mnt/server\r\n\r\ncd /mnt/server\r\n\r\nif [ -z \"${BUNGEE_VERSION}\" ] || [ \"${BUNGEE_VERSION}\" == \"latest\" ]; then\r\n BUNGEE_VERSION=\"lastStableBuild\"\r\nfi\r\n\r\ncurl -o ${SERVER_JARFILE} https://ci.md-5.net/job/BungeeCord/${BUNGEE_VERSION}/artifact/bootstrap/target/BungeeCord.jar", "privileged": true }, "startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -jar {{SERVER_JARFILE}}", "updated_at": "2022-06-27T03:53:00+00:00", "uuid": "ebd6956d-e9d2-4a67-bd23-c0abd5cd3dfc" } } ] } ``` -------------------------------- ### Reinstall Server Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/README.md Reinstalls a server to its default configuration. ```APIDOC ## POST /api/client/servers/{server_id}/settings/reinstall ### Description Reinstalls a server to its default configuration. ### Method POST ### Endpoint /api/client/servers/{server_id}/settings/reinstall ### Parameters #### Path Parameters - **server_id** (string) - Required - The unique identifier of the server. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the server. - **status** (string) - The current status of the server (e.g., "reinstalling"). #### Response Example { "id": 1, "status": "reinstalling" } ``` -------------------------------- ### Get Specific Server User - Example Response Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/users.md This JSON structure represents the response when retrieving information about a specific subuser associated with a server. It includes detailed attributes of the user. ```json { "object": "server_subuser", "attributes": { "uuid": "60a7aec3-e17d-4aa9-abb3-56d944d204b4", "username": "subuser2jvc", "email": "subuser2@example.com", "image": "https://gravatar.com/avatar/3bb1c751a8b3488f4a4c70eddfe898d8", "2fa_enabled": false, "created_at": "2020-06-12T23:31:41+01:00", "permissions": ["control.console", "control.start", "websocket.connect"] } } ``` -------------------------------- ### Example API Key Response Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/account/account.md This JSON array contains details for each API key associated with the user's account, including its identifier, description, allowed IPs, and usage timestamps. ```json { "data": [ { "identifier": "wwQ5DJ6X1XaFznQS", "description": "API Docs", "allowed_ips": [], "last_used_at": "2020-06-03T15:04:47+01:00", "created_at": "2020-05-18T00:12:43+01:00" } ] } ``` -------------------------------- ### Control Server Power State Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Sends a power signal (start, stop, restart, kill) to a specific server. Note that certain states like transferring or installing may prevent immediate action. ```bash curl -X POST https://panel.example.com/api/client/servers/1a7ce997/power \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"signal": "start"}' ``` -------------------------------- ### Example JSON Body for Renaming Files Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/files.md This JSON body demonstrates how to specify files for renaming. It includes the root directory and an array of objects, each containing the original and new file names. ```json { "root": "/", "files": [ { "from": "bungeecord.jar", "to": "server.jar" } ] } ``` -------------------------------- ### Example Single Nest Egg Response Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/nests-eggs.md This JSON object shows the structure of a single Pterodactyl Nest Egg when retrieved via its specific ID. It contains detailed attributes like author, configuration, and installation scripts. ```json { "object": "egg", "attributes": { "author": "support@pterodactyl.io", "config": { "extends": null, "file_denylist": [], "files": { "config.yml": { "find": { "listeners[0].host": "0.0.0.0:{{server.build.default.port}}", "listeners[0].query_port": "{{server.build.default.port}}", "servers.*.address": { "regex": "^(127\\.0\\.0\\.1|localhost)(:\\d{1,5})?$": "{{config.docker.interface}}$2" } }, "parser": "yaml" } }, "logs": [], "startup": { "done": "Listening on " }, "stop": "end" }, "created_at": "2022-01-03T08:07:20+00:00", "description": "...", "docker_image": "ghcr.io/pterodactyl/yolks:java_17", "docker_images": { "Java 11": "ghcr.io/pterodactyl/yolks:java_11", "Java 16": "ghcr.io/pterodactyl/yolks:java_16", "Java 17": "ghcr.io/pterodactyl/yolks:java_17", "Java 8": "ghcr.io/pterodactyl/yolks:java_8" }, "id": 1, "name": "Bungeecord", "nest": 1, "script": { "container": "ghcr.io/pterodactyl/installers:alpine", "entry": "ash", "extends": null, "install": "#!/bin/ash\r\n# Bungeecord Installation Script\r\n#\r\n# Server Files: /mnt/server\r\n\r\ncd /mnt/server\r\n\r\nif [ -z \"${BUNGEE_VERSION}\" ] || [ \"${BUNGEE_VERSION}\" == \"latest\" ]; then\r\n BUNGEE_VERSION=\"lastStableBuild\"\r\nfi\r\n\r\ncurl -o ${SERVER_JARFILE} https://ci.md-5.net/job/BungeeCord/${BUNGEE_VERSION}/artifact/bootstrap/target/BungeeCord.jar", "privileged": true }, "startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -jar {{SERVER_JARFILE}}", "updated_at": "2022-06-27T03:53:00+00:00", "uuid": "ebd6956d-e9d2-4a67-bd23-c0abd5cd3dfc" } } ``` -------------------------------- ### Create Server Backup Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/backups.md Initiates the creation of a new backup for a server, with options to specify a name, ignored files, and lock status. ```APIDOC ## Create Server Backup ### `POST /api/client/servers/:server_id/backups` Creates a new backup for a server. ### Body | Name | Visibility | Type | Description | | --------- | ---------- | ------- | -------------------------------------------- | | name | required | string | The name of the backup. | | ignored | optional | string | A list of ignored files separated by commas. | | is_locked | optional | boolean | Indicates if the backup should be locked. | ### Response | Code | Description | | ---- | ------------------ | | 200 | Request successful | ``` -------------------------------- ### Update Remote Server Installation Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/remote/server_installation.md Updates the installation state of a server, indicating whether the installation process has been completed. ```APIDOC ## POST /api/remote/servers/:uuid/install ### Description Updates the installation state of a server. ### Method POST ### Endpoint /api/remote/servers/:uuid/install ### Parameters #### Request Body - **successful** (boolean) - Required - Notifies if the server has completed the installation process. - **reinstall** (boolean) - Required - The state of the server. ### Responses #### Success Response (204) - The request was successful. #### Error Response (404) - The server was not found. ``` -------------------------------- ### Send 'set state' Event Source: https://github.com/devnote-dev/ptero-notes/blob/main/wings/websocket.md Controls the power state of the server. Use 'start', 'stop', 'restart', or 'kill' as arguments. ```json { "event":"set state", "args": ["start"] } ``` -------------------------------- ### Update Remote Server Installation State Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/remote/server_installation.md Updates the installation status of a remote server. Use this endpoint to notify the panel whether the server installation process has been successfully completed or if a reinstallation is required. ```json { "successful": true, "reinstall": false } ``` -------------------------------- ### Create User Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/users.md Creates a new user account. Requires a username, email, first name, and last name. Optional fields include external ID, language, password, and root admin status. ```APIDOC ## POST /api/application/users ### Description Creates a new user account. ### Method POST ### Endpoint /api/application/users ### Request Body - **email** (string) - required - The account email. - **external_id** (string) - optional - An external identifier for the account. - **first_name** (string) - required - The first name for the account. - **language** (string) - optional - The language identifier for the account. - **last_name** (string) - required - The last name for the account. - **password** (string) - optional - The password for the account. Manual input by the account holder is required if this is not set. - **root_admin** (boolean) - optional - Whether the account will have administrative access. - **username** (string) - required - The account username. ### Response #### Success Response (201) - **Description**: The request was successful. #### Error Response (422) - **Description**: One or more validation rules failed. ``` -------------------------------- ### Get Server Details (Client API) Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Retrieves comprehensive information about a specific server accessible to the authenticated client user. Includes status, limits, and allocation details. ```bash curl https://panel.example.com/api/client/servers/1a7ce997 \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" ``` -------------------------------- ### Get Node Configuration Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/nodes.md Retrieves the configuration details for a specific node. ```APIDOC ## GET /nodes/:id/configuration ### Description Returns the configuration data of a specified node. ### Parameters #### Path Parameters - **id** (number) - Required - The ID of the node. ### Responses #### Success Response (204) - **object** (string) - The type of the resource, always "node_configuration". - **attributes** (object) - Contains the node's configuration details. ``` -------------------------------- ### Create a New User Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Creates a new user account with specified credentials and details. A 201 status code is returned on success, and 422 on validation failure. ```bash # Create a new user curl -X POST https://panel.example.com/api/application/users \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "username": "jdoe", "email": "jdoe@example.com", "first_name": "John", "last_name": "Doe", "password": "SecurePass123!", "root_admin": false, "language": "en" }' ``` -------------------------------- ### Get Account Details Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/account/account.md Retrieves the account details of the authenticated user. ```APIDOC ## GET /api/client/account ### Description Retrieves the account details of the authenticated user. ### Method GET ### Endpoint /api/client/account ### Responses #### Success Response (200) - **object** (string) - The type of the object returned. - **attributes** (object) - Contains the user's account attributes. - **id** (integer) - The user's unique identifier. - **admin** (boolean) - Indicates if the user has administrator privileges. - **username** (string) - The user's username. - **email** (string) - The user's email address. - **first_name** (string) - The user's first name. - **last_name** (string) - The user's last name. - **language** (string) - The user's preferred language. ### Response Example ```json { "object": "user", "attributes": { "id": 1, "admin": true, "username": "admin", "email": "example@example.com", "first_name": "Admin", "last_name": "User", "language": "en" } } ``` ``` -------------------------------- ### Create a Server Database Source: https://context7.com/devnote-dev/ptero-notes/llms.txt Create a new MySQL database associated with a server. The request body requires a database name and optionally a remote host. The response includes credentials, including the generated password. ```bash curl -X POST https://panel.example.com/api/client/servers/1a7ce997/databases \ -H "Authorization: Bearer ptlc_your_api_key" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{"database": "mydb", "remote": "%"}' ``` -------------------------------- ### Create Server User Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/users.md Creates a new subuser for a given server with specified email and permissions. ```APIDOC ## POST /api/client/servers/:serverId/users ### Description Creates a new subuser for the given server. ### Method POST ### Endpoint /api/client/servers/:serverId/users ### Parameters #### Request Body - **email** (string) - Required - Email of the user to be invited. - **permissions** (string[]) - Required - An array of permissions to assign to the new subuser. ### Responses #### Success Response (200) - **object** (string) - The type of the response object, typically "server_subuser". - **attributes** (object) - Contains the attributes of the newly created subuser. - **uuid** (string) - The unique identifier for the subuser. - **username** (string) - The username of the subuser. - **email** (string) - The email address of the subuser. - **image** (string) - URL to the subuser's avatar image. - **2fa_enabled** (boolean) - Indicates if two-factor authentication is enabled for the subuser. - **created_at** (string) - The timestamp when the subuser was created. - **permissions** (array) - An array of strings representing the user's permissions. ``` -------------------------------- ### Get Nests Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/application/nests-eggs.md Retrieves a list of all available nests. Supports filtering and pagination. ```APIDOC ## GET /nests ### Description Returns a list of nest objects. Supports optional inclusion of related data and pagination. ### Method GET ### Endpoint /nests ### Parameters #### Query Parameters - **include** (array[string]) - Optional - Allowed Values: eggs, servers - **page** (number) - Optional - Minimum Value: 1 - **per_page** (number) - Optional - Minimum Value: 1 ### Responses #### Success Response (200) - **object** (string) - Indicates the type of the returned object, expected to be "list". - **data** (array) - An array of nest objects. - Each nest object contains: - **object** (string) - Indicates the type of the object, expected to be "nest". - **attributes** (object) - Contains the nest's properties: - **author** (string) - **created_at** (string) - **description** (string) - **id** (number) - **name** (string) - **updated_at** (string) - **uuid** (string) #### Response Example (200) ```json { "object": "list", "data": [ { "object": "nest", "attributes": { "author": "support@pterodactyl.io", "created_at": "2022-01-03T08:07:20+00:00", "description": "Minecraft - the classic game from Mojang. With support for Vanilla MC, Spigot, and many others!", "id": 1, "name": "Minecraft", "updated_at": "2022-01-03T08:07:20+00:00", "uuid": "535d963e-9eed-4145-8f10-151cf625211e" } } ] } ``` ``` -------------------------------- ### Get Server Backups Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/backups.md Retrieves a list of all backups associated with a specific server. ```APIDOC ## Get Server Backups ### `GET /api/client/servers/:server_id/backups` Returns a list of backups for a given server. ### Response | Code | Description | | ---- | ------------------ | | 200 | Request successful | ### Example Response ```json { "object": "list", "data": [ { "object": "backup", "attributes": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "is_successful": true, "is_locked": false, "name": "backup-20210611", "ignored_files": [], "checksum": null, "bytes": 102400, "created_at": "2023-06-11T12:34:56Z", "completed_at": "2023-06-11T13:45:00Z" } } ], "meta": { "pagination": { "total": 2, "count": 2, "per_page": 20, "current_page": 1, "total_pages": 1, "links": {} } } } ``` ``` -------------------------------- ### Create Server Database Source: https://github.com/devnote-dev/ptero-notes/blob/main/pterodactyl/client/servers/databases.md Creates a new database for the specified server. ```APIDOC ## POST /api/client/servers/:serverId/databases ### Description Creates a new database for the given server and returns its details. ### Method POST ### Endpoint /api/client/servers/:serverId/databases ### Parameters #### Request Body - **database** (string) - Required - The desired name for the new database. - **remote** (string) - Required - The remote URL or IP address from which the database can be accessed. ### Request Example ```json { "database": "my_new_database", "remote": "192.168.1.0/24" } ``` ### Responses #### Success Response (200) - **object** (string) - Indicates the type of the returned object, expected to be "server_database". - **attributes** (object) - Contains the attributes of the newly created database. - **id** (string) - The unique identifier for the database. - **host** (object) - Information about the database host. - **address** (string) - The IP address of the database host. - **port** (integer) - The port number for the database connection. - **name** (string) - The name of the database. - **username** (string) - The username for connecting to the database. - **connections_from** (string) - Specifies allowed connection origins. - **max_connections** (integer) - The maximum number of allowed connections. - **relationships** (object) - Contains related objects, such as the password. - **password** (object) - Details about the database password. - **object** (string) - Indicates the type of the password object, expected to be "database_password". - **attributes** (object) - Contains the password attributes. - **password** (string) - The generated password for the database. ### Response Example ```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": "=lR2orDOcwfKkM=BXb.BVF.C" } } } } } ``` ``` -------------------------------- ### Get Server by UUID Source: https://github.com/devnote-dev/ptero-notes/blob/main/wings/server.md Retrieves a server object using its unique identifier (UUID). ```APIDOC ## GET /api/servers/:uuid ### Description Returns a server object by its UUID. ### Method GET ### Endpoint /api/servers/:uuid ### Responses #### Success Response (200) - The request was successful. #### Error Response (404) - The server was not found. ```