diff --git a/pterodactyl/remote/README.md b/pterodactyl/remote/README.md index 0d807d5..5fdfca2 100644 --- a/pterodactyl/remote/README.md +++ b/pterodactyl/remote/README.md @@ -2,6 +2,8 @@ This API is used for Wings communication and is primarily for Wings, but can be accessed externally. This API is not documented so there is very little information about it. -# Access +## Access -Unknown. +The `Authorization` header must be present in the requests and must be prefixed with "Bearer " followed by the node's token_id, a period, then the node's token. The token can be obtained in the configuration page of a node in the admin panel, or from the [node configuration endpoint](/pterodactyl/application/nodes.md#get-nodesidconfiguration) in the application API. + +WIP. Add more information about headers here. diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md new file mode 100644 index 0000000..961dc0f --- /dev/null +++ b/pterodactyl/remote/server_backups.md @@ -0,0 +1,72 @@ +### `GET /api/remote/backups/:backup` + +Returns the required presigned urls to upload a backup to S3 cloud storage. + +### Parameters + +| Name | Visibility | Description | +| --------- | ---------- | ------------------------------- | +| size | optional | The amount of backup URLs to give. | + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php#L33](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php#L33) + +### `POST /api/remote/backups/:backup` + +Handles updating the state of a backup. + +### Body + +| Name | Visibility | Type | Description | +| ----- | ---------- | ------ | -------------------------------------------- | +| data | required | object | An object containing the checksum, checksum type, backup size, success state, and parts of the backup. | + +### Example Body + +```json +{ + "data": { + "checksum": string, + "checksum_type": string, + "size": number, + "successful", boolean, + "parts": [ + { + "etag": string, + "part_number": number, + } + ] + } +} +``` + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Backups/BackupStatusController.php#L31](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Backups/BackupStatusController.php#L31) + +### `POST /api/remote/backups/:backup/restore` + +Handles toggling the restoration status of a server. + +### Body + +| Name | Visibility | Type | Description | +| ----- | ---------- | ------ | -------------------------------------------- | +| successful | required | boolean | The success state of the backup restoration. | + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Backups/BackupStatusController.php#L78](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Backups/BackupStatusController.php#L78) diff --git a/pterodactyl/remote/server_installation.md b/pterodactyl/remote/server_installation.md new file mode 100644 index 0000000..6910b4e --- /dev/null +++ b/pterodactyl/remote/server_installation.md @@ -0,0 +1,42 @@ +### `GET /api/remote/servers/:uuid` + +Returns details about the server that allows Wings to self-recover and ensure that the state of the server matches the Panel at all times. + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L35](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L35) + +### `GET /api/remote/servers/:uuid/install` + +Returns installation information for a server. + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php#L30](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php#L30) + +### `POST /api/remote/servers/:uuid/install` + +Updates the installation state of a server. + +### Body + +| Name | Visibility | Type | Description | +| ----- | ---------- | ------ | -------------------------------------------- | +| successful | required | boolean | Notifies the server has completed the installation process. | +| reinstall | required | boolean | The state of the server. | + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php#L48](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerInstallController.php#L48) diff --git a/pterodactyl/remote/server_transfer.md b/pterodactyl/remote/server_transfer.md new file mode 100644 index 0000000..aceafc5 --- /dev/null +++ b/pterodactyl/remote/server_transfer.md @@ -0,0 +1,23 @@ +### `POST /api/remote/servers/:uuid/transfer/success` + +The daemon notifies the panel about a transfer success. + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Servers/ServerTransferController.php#L50](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerTransferController.php#L50) + +### `POST /api/remote/servers/:uuid/transfer/failure` + +The daemon notifies the panel about a transfer failure. + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Servers/ServerTransferController.php#L34](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerTransferController.php#L34) diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md new file mode 100644 index 0000000..453b4e5 --- /dev/null +++ b/pterodactyl/remote/servers.md @@ -0,0 +1,68 @@ +### `GET /api/remote/servers` + +Lists all servers with their configurations that are assigned to the requesting node. + +### Parameters + +| Name | Visibility | Description | +| --------- | ---------- | ------------------------------- | +| page | optional | The page to list. | +| per_page | optional | The amount of servers to list. | + +### Responses + +WIP. + +Sources + +- [https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L49](app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L49) + +--- + +### `POST /api/remote/servers/reset` + +Resets the state of all servers on the node to be normal. + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L72](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L72) + +--- + +### `POST /api/remote/activity` + +### Body + +| Name | Visibility | Type | Description | +| ----- | ---------- | ------ | -------------------------------------------- | +| data | required | array | An array with all server activity data. | + +### Example Body + +```json +{ + "data": [ + { + "server": string, + "event": string, + "timestamp": string, // timestamp + "metadata": , // null, string or json blob with event specific metadata (it depends) + "ip": string, // ip address or empty string + "user": string, // user uuid or empty string + }, + ... + ] +} +``` + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/ActivityProcessingController.php#L20](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/ActivityProcessingController.php#L20) diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md new file mode 100644 index 0000000..8164d18 --- /dev/null +++ b/pterodactyl/remote/sftp.md @@ -0,0 +1,19 @@ +### `POST /api/remote/sftp/auth` + +Authenticate a set of credentials and return the associated server details for a SFTP connection on the daemon. This supports both public key and password based credentials. + +### Body + +| Name | Visibility | Type | Description | +| ----- | ---------- | ------ | -------------------------------------------- | +| type | required | string | Determine if the password should check authentication with either the "public_key" or "ssh_key". | +| username | required | string | The username of the user attempting to login. | +| password | required | string | The password of the user attempting to login. | + +### Responses + +WIP. + +Sources + +- [app/Http/Controllers/Api/Remote/SftpAuthenticationController.php#L34](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/SftpAuthenticationController.php#L34)