From 67851e9d26f7ac23de830101a1b9c5a3fde65f12 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 18:54:54 -0400 Subject: [PATCH 01/29] A layout of Pterodactyl Panel's remote API. --- pterodactyl/remote/README.md | 6 +- pterodactyl/remote/server_backups.md | 72 +++++++++++++++++++++++ pterodactyl/remote/server_installation.md | 42 +++++++++++++ pterodactyl/remote/server_transfer.md | 23 ++++++++ pterodactyl/remote/servers.md | 68 +++++++++++++++++++++ pterodactyl/remote/sftp.md | 20 +++++++ 6 files changed, 229 insertions(+), 2 deletions(-) create mode 100644 pterodactyl/remote/server_backups.md create mode 100644 pterodactyl/remote/server_installation.md create mode 100644 pterodactyl/remote/server_transfer.md create mode 100644 pterodactyl/remote/servers.md create mode 100644 pterodactyl/remote/sftp.md 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..f60f9f0 --- /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..4b5ca72 --- /dev/null +++ b/pterodactyl/remote/sftp.md @@ -0,0 +1,20 @@ +### `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) From 5a11673fb9f0f4a2aa74d0591f62649521712396 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 18:59:56 -0400 Subject: [PATCH 02/29] Fixed few mistakes. --- pterodactyl/remote/servers.md | 14 +++++++------- pterodactyl/remote/sftp.md | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index f60f9f0..453b4e5 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -45,14 +45,14 @@ Sources ```json { - data: [ + "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 + "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 }, ... ] diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index 4b5ca72..8164d18 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -4,7 +4,6 @@ Authenticate a set of credentials and return the associated server details for a ### Body - | Name | Visibility | Type | Description | | ----- | ---------- | ------ | -------------------------------------------- | | type | required | string | Determine if the password should check authentication with either the "public_key" or "ssh_key". | From 6c9f4570d184002c3b8fd4321a91a6d726f23540 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 20:39:40 -0400 Subject: [PATCH 03/29] Update server_installation.md --- pterodactyl/remote/server_installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/remote/server_installation.md b/pterodactyl/remote/server_installation.md index 6910b4e..7f32a9d 100644 --- a/pterodactyl/remote/server_installation.md +++ b/pterodactyl/remote/server_installation.md @@ -30,7 +30,7 @@ Updates the installation state of a server. | Name | Visibility | Type | Description | | ----- | ---------- | ------ | -------------------------------------------- | -| successful | required | boolean | Notifies the server has completed the installation process. | +| successful | required | boolean | Notifies if the server has completed the installation process. | | reinstall | required | boolean | The state of the server. | ### Responses From 2d5d9309c378cc327c2c2660979757c3ec006bc5 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 22:22:25 -0400 Subject: [PATCH 04/29] Explained headers in README.md. --- pterodactyl/remote/README.md | 4 +--- pterodactyl/remote/server_backups.md | 18 +++++++++--------- pterodactyl/remote/server_installation.md | 8 ++++---- pterodactyl/remote/servers.md | 10 +++++----- pterodactyl/remote/sftp.md | 10 +++++----- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/pterodactyl/remote/README.md b/pterodactyl/remote/README.md index 5fdfca2..0ea9e19 100644 --- a/pterodactyl/remote/README.md +++ b/pterodactyl/remote/README.md @@ -4,6 +4,4 @@ This API is used for Wings communication and is primarily for Wings, but can be ## Access -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. +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. The `Accept` header must be set to "application/json" for requests, and the `Content-Type` must be set to "application/json" when making `POST` requests. diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 961dc0f..989116d 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -4,9 +4,9 @@ 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. | +| Name | Visibility | Description | +| --------- | ---------- | ---------------------------------- | +| size | optional | The amount of backup URLs to give. | ### Responses @@ -22,9 +22,9 @@ 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. | +| 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 @@ -59,9 +59,9 @@ Handles toggling the restoration status of a server. ### Body -| Name | Visibility | Type | Description | -| ----- | ---------- | ------ | -------------------------------------------- | -| successful | required | boolean | The success state of the backup restoration. | +| Name | Visibility | Type | Description | +| ---------- | ---------- | ------- | -------------------------------------------- | +| successful | required | boolean | The success state of the backup restoration. | ### Responses diff --git a/pterodactyl/remote/server_installation.md b/pterodactyl/remote/server_installation.md index 7f32a9d..1361358 100644 --- a/pterodactyl/remote/server_installation.md +++ b/pterodactyl/remote/server_installation.md @@ -28,10 +28,10 @@ Updates the installation state of a server. ### Body -| Name | Visibility | Type | Description | -| ----- | ---------- | ------ | -------------------------------------------- | -| successful | required | boolean | Notifies if the server has completed the installation process. | -| reinstall | required | boolean | The state of the server. | +| Name | Visibility | Type | Description | +| ---------- | ---------- | ------- | -------------------------------------------------------------- | +| successful | required | boolean | Notifies if the server has completed the installation process. | +| reinstall | required | boolean | The state of the server. | ### Responses diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index 453b4e5..410ff95 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -4,10 +4,10 @@ Lists all servers with their configurations that are assigned to the requesting ### Parameters -| Name | Visibility | Description | -| --------- | ---------- | ------------------------------- | -| page | optional | The page to list. | -| per_page | optional | The amount of servers to list. | +| Name | Visibility | Description | +| --------- | ---------- | ------------------------------ | +| page | optional | The page to list. | +| per_page | optional | The amount of servers to list. | ### Responses @@ -39,7 +39,7 @@ Sources | Name | Visibility | Type | Description | | ----- | ---------- | ------ | -------------------------------------------- | -| data | required | array | An array with all server activity data. | +| data | required | array | An array with all server activity data. | ### Example Body diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index 8164d18..9815aa9 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -4,11 +4,11 @@ Authenticate a set of credentials and return the associated server details for a ### 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. | +| 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 From a17a314a0cc8ce6227dc3879e5d463c88fd0c2da Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 22:57:24 -0400 Subject: [PATCH 05/29] I fixed values for the two 'example body's. --- pterodactyl/remote/server_backups.md | 10 ++-- pterodactyl/remote/servers.md | 87 +++++++++++++++++++++++++--- 2 files changed, 85 insertions(+), 12 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 989116d..0c4d99a 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -31,10 +31,10 @@ Handles updating the state of a backup. ```json { "data": { - "checksum": string, - "checksum_type": string, - "size": number, - "successful", boolean, + "checksum": "a0b124c3def45g67890h12i3j4567k8l9mn01234", + "checksum_type": "sha1", + "size": 1234, + "successful": true, "parts": [ { "etag": string, @@ -45,6 +45,8 @@ Handles updating the state of a backup. } ``` +Note: `parts` can also be defined as `null`. + ### Responses WIP. diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index 410ff95..0920ff4 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -47,18 +47,89 @@ Sources { "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 - }, - ... + "server": "a1bc2345-678d-9e01-2f3g-4hijk5l6m789", + "event": "server:sftp.write", + "timestamp": "1968-01-01T00:00:00.000000000Z", + "metadata": { + "files": [ "/fake.log" ], + }, + "ip": "0.0.0.0", + "user": "abcde1fg-2345-6789-012h-ij34kl5m6789" + } ] } ``` +Notes + +- Here is a list of all possible values for `event`. + +```text +server.backup.restore-failed +server:allocation.create +server:allocation.delete +server:allocation.notes +server:allocation.primary +server:backup.complete +server:backup.delete +server:backup.download +server:backup.fail +server:backup.lock +server:backup.restore +server:backup.restore-complete +server:backup.restore-failed +server:backup.restore-started +server:backup.start +server:backup.unlock +server:console.command +server:console.command +server:database.create +server:database.delete +server:database.rotate-password +server:file.compress +server:file.copy +server:file.create-directory +server:file.decompress +server:file.delete +server:file.download +server:file.pull +server:file.read +server:file.rename +server:file.uploaded +server:file.write +server:power.kill +server:power.restart +server:power.start +server:power.stop +server:reinstall +server:schedule.create +server:schedule.delete +server:schedule.execute +server:schedule.update +server:settings.description +server:settings.rename +server:sftp.create +server:sftp.create-directory +server:sftp.delete +server:sftp.denied +server:sftp.rename +server:sftp.write +server:startup.edit +server:startup.image +server:subuser.create +server:subuser.delete +server:subuser.update +server:task.create +server:task.delete +server:task.update + +* If there are any missing events, feel free to open a pull request. +``` + +- `metadata` depends on the event. It can be null, a string, or a json blob with event specific metadata. +- `ip` has to be an IP address or empty string. +- `user` has to be a user UUID or undefined. + ### Responses WIP. From b232da6b431b1d993581523a978ff314fa241933 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 22:59:25 -0400 Subject: [PATCH 06/29] It looks a lot nicer by dividing each route using "---". --- pterodactyl/remote/server_backups.md | 4 ++++ pterodactyl/remote/server_installation.md | 4 ++++ pterodactyl/remote/server_transfer.md | 2 ++ 3 files changed, 10 insertions(+) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 0c4d99a..e19f9b2 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -16,6 +16,8 @@ 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. @@ -55,6 +57,8 @@ 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. diff --git a/pterodactyl/remote/server_installation.md b/pterodactyl/remote/server_installation.md index 1361358..07fa075 100644 --- a/pterodactyl/remote/server_installation.md +++ b/pterodactyl/remote/server_installation.md @@ -10,6 +10,8 @@ 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. @@ -22,6 +24,8 @@ 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. diff --git a/pterodactyl/remote/server_transfer.md b/pterodactyl/remote/server_transfer.md index aceafc5..7b44eac 100644 --- a/pterodactyl/remote/server_transfer.md +++ b/pterodactyl/remote/server_transfer.md @@ -10,6 +10,8 @@ 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. From b9030d0c5e5cf0a9552c94e94eb0cc21053d9589 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Mon, 12 Jun 2023 23:47:08 -0400 Subject: [PATCH 07/29] Added response and example for servers. --- pterodactyl/remote/servers.md | 142 +++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index 0920ff4..f75b4b7 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -11,7 +11,147 @@ Lists all servers with their configurations that are assigned to the requesting ### Responses -WIP. +| Code | Description | +| ---- | --------------------------- | +| 200 | The request was successful. | + +### Response example + +```json +{ + "data": [ + { + "uuid": "0a123456-bcd7-8901-e234-567fgh890ij1", + "settings": { + "uuid": "0a123456-bcd7-8901-e234-567fgh890ij1", + "meta": { + "name": "My server", + "description": "" + }, + "suspended": false, + "environment": { + "SERVER_JARFILE": "server.jar", + "MC_VERSION": "latest", + "BUILD_TYPE": "recommended", + "FORGE_VERSION": "", + "STARTUP": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s \"-jar {{SERVER_JARFILE}}\" || printf %s \"@unix_args.txt\" )", + "P_SERVER_LOCATION": "home", + "P_SERVER_UUID": "0a123456-bcd7-8901-e234-567fgh890ij1", + "P_SERVER_ALLOCATION_LIMIT": 0 + }, + "invocation": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s \"-jar {{SERVER_JARFILE}}\" || printf %s \"@unix_args.txt\" )", + "skip_egg_scripts": false, + "build": { + "memory_limit": 0, + "swap": 0, + "io_weight": 500, + "cpu_limit": 0, + "threads": null, + "disk_space": 0, + "oom_disabled": true + }, + "container": { + "image": "ghcr.io/pterodactyl/yolks:java_8", + "oom_disabled": true, + "requires_rebuild": false + }, + "allocations": { + "force_outgoing_ip": false, + "default": { + "ip": "192.168.228.1", + "port": 25565 + }, + "mappings": { + "192.168.228.1": [ + 25565 + ] + } + }, + "mounts": [], + "egg": { + "id": "b3e7a6b9-1cc9-4d3e-9372-88b6d96c6b0f", + "file_denylist": [] + } + }, + "process_configuration": { + "startup": { + "done": [ + ")! For help, type " + ], + "user_interaction": [], + "strip_ansi": false + }, + "stop": { + "type": "command", + "value": "stop" + }, + "configs": [ + { + "parser": "properties", + "file": "server.properties", + "replace": [ + { + "match": "server-ip", + "replace_with": "0.0.0.0" + }, + { + "match": "server-port", + "replace_with": "25565" + }, + { + "match": "query.port", + "replace_with": "25565" + } + ] + } + ] + } + } + ], + "links": { + "first": "http://localhost/api/remote/servers?page=1", + "last": "http://localhost/api/remote/servers?page=3", + "prev": null, + "next": "http://localhost/api/remote/servers?page=2" + }, + "meta": { + "current_page": 1, + "from": 1, + "last_page": 3, + "links": [ + { + "url": null, + "label": "« Previous", + "active": false + }, + { + "url": "http://localhost/api/remote/servers?page=1", + "label": "1", + "active": true + }, + { + "url": "http://localhost/api/remote/servers?page=2", + "label": "2", + "active": false + }, + { + "url": "http://localhost/api/remote/servers?page=3", + "label": "3", + "active": false + }, + { + "url": "http://localhost/api/remote/servers?page=2", + "label": "Next »", + "active": false + } + ], + "path": "http://localhost/api/remote/servers", + "per_page": 1, + "to": 1, + "total": 3 + } +} +``` Sources From 4c78b878f2a5cb5a98f97fd512779ae5addc8c69 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 13 Jun 2023 22:25:38 -0400 Subject: [PATCH 08/29] Finished server_installation.md. --- pterodactyl/remote/server_installation.md | 118 +++++++++++++++++++++- pterodactyl/remote/servers.md | 20 ++-- 2 files changed, 126 insertions(+), 12 deletions(-) diff --git a/pterodactyl/remote/server_installation.md b/pterodactyl/remote/server_installation.md index 07fa075..fcdecb8 100644 --- a/pterodactyl/remote/server_installation.md +++ b/pterodactyl/remote/server_installation.md @@ -4,7 +4,101 @@ Returns details about the server that allows Wings to self-recover and ensure th ### Responses -WIP. +| Code | Description | +| ---- | --------------------------- | +| 200 | The request was successful. | +| 404 | The server was not found. | + +### Response example + +```json +{ + "settings": { + "uuid": "1abc23d4-567e-8f9g-9h01-2ij34k56lmno", + "meta": { + "name": "My server", + "description": "" + }, + "suspended": false, + "environment": { + "SERVER_JARFILE": "server.jar", + "MC_VERSION": "latest", + "BUILD_TYPE": "recommended", + "FORGE_VERSION": "", + "STARTUP": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s \"-jar {{SERVER_JARFILE}}\" || printf %s \"@unix_args.txt\" )", + "P_SERVER_LOCATION": "home", + "P_SERVER_UUID": "1abc23d4-567e-8f9g-9h01-2ij34k56lmno", + "P_SERVER_ALLOCATION_LIMIT": 0 + }, + "invocation": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s \"-jar {{SERVER_JARFILE}}\" || printf %s \"@unix_args.txt\" )", + "skip_egg_scripts": false, + "build": { + "memory_limit": 0, + "swap": 0, + "io_weight": 500, + "cpu_limit": 0, + "threads": null, + "disk_space": 0, + "oom_disabled": true + }, + "container": { + "image": "ghcr.io/pterodactyl/yolks:java_8", + "oom_disabled": true, + "requires_rebuild": false + }, + "allocations": { + "force_outgoing_ip": false, + "default": { + "ip": "127.0.0.1", + "port": 25565 + }, + "mappings": { + "127.0.0.1": [ + 25565 + ] + } + }, + "mounts": [], + "egg": { + "id": "a1b2c3d4-5ef6-7g8h-9012-34i5j67k8l9m", + "file_denylist": [] + } + }, + "process_configuration": { + "startup": { + "done": [ + ")! For help, type " + ], + "user_interaction": [], + "strip_ansi": false + }, + "stop": { + "type": "command", + "value": "stop" + }, + "configs": [ + { + "parser": "properties", + "file": "server.properties", + "replace": [ + { + "match": "server-ip", + "replace_with": "0.0.0.0" + }, + { + "match": "server-port", + "replace_with": "25565" + }, + { + "match": "query.port", + "replace_with": "25565" + } + ] + } + ] + } +} +``` Sources @@ -18,7 +112,22 @@ Returns installation information for a server. ### Responses -WIP. +| Code | Description | +| ---- | --------------------------- | +| 200 | The request was successful. | +| 404 | The server was not found. | + +### Response example + +```json +{ + "body": { + "container_image": "openjdk:8-jdk-slim", + "entrypoint": "bash", + "script": "#!/bin/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: /mnt/server\r\napt update\r\napt install -y curl jq\r\n\r\nif [[ ! -d /mnt/server ]]; then\r\n mkdir /mnt/server\r\nfi\r\n\r\ncd /mnt/server\r\n\r\n# Remove spaces from the version number to avoid issues with curl\r\nFORGE_VERSION=\"$(echo \"$FORGE_VERSION\" | tr -d ' ')\"\r\nMC_VERSION=\"$(echo \"$MC_VERSION\" | tr -d ' ')\"\r\n\r\nif [[ ! -z ${FORGE_VERSION} ]]; then\r\n DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION}\r\n FORGE_JAR=forge-${FORGE_VERSION}*.jar\r\nelse\r\n JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json)\r\n\r\n if [[ \"${MC_VERSION}\" == \"latest\" ]] || [[ \"${MC_VERSION}\" == \"\" ]]; then\r\n echo -e \"getting latest version of forge.\"\r\n MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains(\"latest\")) | split(\"-\")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)\r\n BUILD_TYPE=latest\r\n fi\r\n\r\n if [[ \"${BUILD_TYPE}\" != \"recommended\" ]] && [[ \"${BUILD_TYPE}\" != \"latest\" ]]; then\r\n BUILD_TYPE=recommended\r\n fi\r\n\r\n echo -e \"minecraft version: ${MC_VERSION}\"\r\n echo -e \"build type: ${BUILD_TYPE}\"\r\n\r\n ## some variables for getting versions and things\r\n FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" --arg BUILD_TYPE \"${BUILD_TYPE}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')\r\n\r\n ## locating the forge version\r\n if [[ \"${VERSION_KEY}\" == \"\" ]] && [[ \"${BUILD_TYPE}\" == \"recommended\" ]]; then\r\n echo -e \"dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested.\"\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains(\"latest\"))')\r\n fi\r\n\r\n ## Error if the mc version set wasn't valid.\r\n if [ \"${VERSION_KEY}\" == \"\" ] || [ \"${VERSION_KEY}\" == \"null\" ]; then\r\n echo -e \"The install failed because there is no valid version of forge for the version of minecraft selected.\"\r\n exit 1\r\n fi\r\n\r\n FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY \"$VERSION_KEY\" '.promos | .[$VERSION_KEY]')\r\n\r\n if [[ \"${MC_VERSION}\" == \"1.7.10\" ]] || [[ \"${MC_VERSION}\" == \"1.8.9\" ]]; then\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar\r\n if [[ \"${MC_VERSION}\" == \"1.7.10\" ]]; then\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar\r\n fi\r\n else\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar\r\n fi\r\nfi\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERV\njava -jar installer.jar --installServer || { echo -e \"\\nInstall failed using Forge version ${FORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}.\\nShould you be using unlimited memory value of 0, make sure to increase the default install resource limits in the Wings config or specify exact allocated memory in the server Build Configuration instead of 0! \\nOtherwise, the Forge installer will not have enough memory.\"; exit 4; }\r\n\r\n# Check if we need a symlink for 1.17+ Forge JPMS args\r\nif [[ $MC_VERSION =~ ^1\\.(17|18|19|20|21|22|23) || $FORGE_VERSION =~ ^1\\.(17|18|19|20|21|22|23) ]]; then\r\n unix_args\r\n\r\n# Check if someone has set MC to latest but overwrote it with older Forge version, otherwise we would have false positives\r\nelif [[ $MC_VERSION == \"latest\" && $FORGE_VERSION =~ ^1\\.(17|18|19|20|21|22|23) ]]; then\r\n unix_args\r\nelse\r\n # For versions below 1.17 that ship with jar\r\n mv $FORGE_JAR $SERVER_JARFILE\r\nfi\r\n\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar\r\necho -e \"Installation process is completed\"" + } +} +``` Sources @@ -39,7 +148,10 @@ Updates the installation state of a server. ### Responses -WIP. +| Code | Description | +| ---- | --------------------------- | +| 204 | The request was successful. | +| 404 | The server was not found. | Sources diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index f75b4b7..b589d3f 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -109,10 +109,10 @@ Lists all servers with their configurations that are assigned to the requesting } ], "links": { - "first": "http://localhost/api/remote/servers?page=1", - "last": "http://localhost/api/remote/servers?page=3", + "first": "http://127.0.0.1/api/remote/servers?page=1", + "last": "http://127.0.0.1/api/remote/servers?page=3", "prev": null, - "next": "http://localhost/api/remote/servers?page=2" + "next": "http://127.0.0.1/api/remote/servers?page=2" }, "meta": { "current_page": 1, @@ -125,27 +125,27 @@ Lists all servers with their configurations that are assigned to the requesting "active": false }, { - "url": "http://localhost/api/remote/servers?page=1", + "url": "http://127.0.0.1/api/remote/servers?page=1", "label": "1", "active": true }, { - "url": "http://localhost/api/remote/servers?page=2", + "url": "http://127.0.0.1/api/remote/servers?page=2", "label": "2", "active": false }, { - "url": "http://localhost/api/remote/servers?page=3", + "url": "http://127.0.0.1/api/remote/servers?page=3", "label": "3", "active": false }, { - "url": "http://localhost/api/remote/servers?page=2", + "url": "http://127.0.0.1/api/remote/servers?page=2", "label": "Next »", "active": false } ], - "path": "http://localhost/api/remote/servers", + "path": "http://127.0.0.1/api/remote/servers", "per_page": 1, "to": 1, "total": 3 @@ -165,7 +165,9 @@ Resets the state of all servers on the node to be normal. ### Responses -WIP. +| Code | Description | +| ---- | --------------------------- | +| 204 | The request was successful. | Sources From 1a5d53cd772ecda7832d2caee89f1f210aa838c5 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 13 Jun 2023 22:31:57 -0400 Subject: [PATCH 09/29] Finished server_transfer.md. --- pterodactyl/remote/server_transfer.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pterodactyl/remote/server_transfer.md b/pterodactyl/remote/server_transfer.md index 7b44eac..3859031 100644 --- a/pterodactyl/remote/server_transfer.md +++ b/pterodactyl/remote/server_transfer.md @@ -4,7 +4,11 @@ The daemon notifies the panel about a transfer success. ### Responses -WIP. +| Code | Description | +| ---- | --------------------------------- | +| 204 | The request was successful. | +| 404 | The server was not found. | +| 409 | Server is not being transferred | Sources @@ -18,7 +22,11 @@ The daemon notifies the panel about a transfer failure. ### Responses -WIP. +| Code | Description | +| ---- | --------------------------------- | +| 204 | The request was successful. | +| 404 | The server was not found. | +| 409 | Server is not being transferred | Sources From c7d67eb99eb4f9d8cc17f4f985174417f904b642 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 13 Jun 2023 22:32:07 -0400 Subject: [PATCH 10/29] Update server_transfer.md --- pterodactyl/remote/server_transfer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pterodactyl/remote/server_transfer.md b/pterodactyl/remote/server_transfer.md index 3859031..3ba8bb0 100644 --- a/pterodactyl/remote/server_transfer.md +++ b/pterodactyl/remote/server_transfer.md @@ -8,7 +8,7 @@ The daemon notifies the panel about a transfer success. | ---- | --------------------------------- | | 204 | The request was successful. | | 404 | The server was not found. | -| 409 | Server is not being transferred | +| 409 | Server is not being transferred. | Sources @@ -26,7 +26,7 @@ The daemon notifies the panel about a transfer failure. | ---- | --------------------------------- | | 204 | The request was successful. | | 404 | The server was not found. | -| 409 | Server is not being transferred | +| 409 | Server is not being transferred. | Sources From 3a0196a3b55125bb5c4717ced33755d0ddf4f27e Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 13 Jun 2023 23:45:55 -0400 Subject: [PATCH 11/29] Added more response information to server_backups.md, but it's not finished. --- pterodactyl/remote/server_backups.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index e19f9b2..833f5e3 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -10,11 +10,27 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. ### Responses -WIP. +| Code | Description | +| ---- | -------------------------------------------------------------- | +| 200 | The response was successful. | +| 400 | The configured backup adapter is not an S3 compatible adapter. | +| 404 | The backup was not found. | +| 409 | Backup is already in completed state. | + +### Response examples + +WIP. Add example data for 'parts'. (note: the response example below was not tested, and manually written based on the panel code.) + +```json +{ + "parts": [], + "part_size": 5368709120 +} +``` 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) +- [app/Http/Controllers/Api/Remote/Backups/BackupRemoteUpl2oadController.php#L33](https://github.com/pterodactyl/panel/blob/v1.11.3/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php#L33) --- @@ -71,7 +87,10 @@ Handles toggling the restoration status of a server. ### Responses -WIP. +| Code | Description | +| ---- | ---------------------------- | +| 204 | The response was successful. | +| 404 | The backup was not found. | Sources From 47da7149b4597a573318ffaba0cdbe5937c1d083 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 13 Jun 2023 23:59:55 -0400 Subject: [PATCH 12/29] Update sftp.md --- pterodactyl/remote/sftp.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index 9815aa9..351ade4 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -6,12 +6,20 @@ Authenticate a set of credentials and return the associated server details for a | Name | Visibility | Type | Description | | -------- | ---------- | ------ | ------------------------------------------------------------------------------------------------ | -| type | required | string | Determine if the password should check authentication with either the "public_key" or "ssh_key". | +| type | required | string | Determine if the password should check authentication with either the "password" or "public_key". | | username | required | string | The username of the user attempting to login. | | password | required | string | The password of the user attempting to login. | ### Responses +| Code | Description | +| ---- | ---------------------------------------- | +| 200 | The response was successful. | +| 403 | Incorrect credentials. | +| 422 | Missing fields. (ex. username, password) | + +### Response example + WIP. Sources From 651d3dca6f192c3cc6660683244daa1a47d5359c Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:31:16 -0400 Subject: [PATCH 13/29] Finished SFTP response example --- pterodactyl/remote/sftp.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index 351ade4..f8e42a1 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -20,7 +20,18 @@ Authenticate a set of credentials and return the associated server details for a ### Response example -WIP. +```json +{ + "user": "1abc23de-4567-89f0-ghi1-h2kl345m6nop", + "server": "1a234567-8b9c-01d2-ef3g-45hi67j890kl", + "permissions": [ + "*", + "admin.websocket.errors", + "admin.websocket.install", + "admin.websocket.transfer" + ] +} +``` Sources From ed84c9082a3a99379e06c90e5df13aab4ca9faaf Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 15:34:49 -0400 Subject: [PATCH 14/29] Finished servers.md --- pterodactyl/remote/servers.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index b589d3f..8c8cde1 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -274,7 +274,10 @@ server:task.update ### Responses -WIP. +| Code | Description | +| ---- | ------------------------------------------------ | +| 200 | The response was successful. (no request body) | +| 422 | Incorrect field data. | Sources From f9de9cfb749803b9ebb7f00ed106a4760b3e03b2 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 21:18:57 -0400 Subject: [PATCH 15/29] Update server_backups.md --- pterodactyl/remote/server_backups.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 833f5e3..18e0aec 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -15,7 +15,7 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. | 200 | The response was successful. | | 400 | The configured backup adapter is not an S3 compatible adapter. | | 404 | The backup was not found. | -| 409 | Backup is already in completed state. | +| 409 | The backup is already in completed state. | ### Response examples @@ -67,7 +67,16 @@ Note: `parts` can also be defined as `null`. ### Responses -WIP. +| Code | Description | +| ---- | ----------------------------------------- | +| 202 | The response was successful. | +| 204 | No content. | +| 400 | The backup is already in completed state. | +| 404 | The backup was not found. | + +### Response example + +WIP. Is there even any? Sources From 699536fc1de28c4617df6c92e0ebbe200436940d Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 21:37:06 -0400 Subject: [PATCH 16/29] Fixed a tiny mistake, and decided to say "screw it" to "parts" and made it null, because it can be that value. --- pterodactyl/remote/server_backups.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 18e0aec..9e13368 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -53,12 +53,7 @@ Handles updating the state of a backup. "checksum_type": "sha1", "size": 1234, "successful": true, - "parts": [ - { - "etag": string, - "part_number": number, - } - ] + "parts": null } } ``` @@ -70,7 +65,6 @@ Note: `parts` can also be defined as `null`. | Code | Description | | ---- | ----------------------------------------- | | 202 | The response was successful. | -| 204 | No content. | | 400 | The backup is already in completed state. | | 404 | The backup was not found. | From 931d2e89d7353170626627ee29fd4871342b7a0e Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 21:40:09 -0400 Subject: [PATCH 17/29] opps it's a 204. was looking at something else. --- pterodactyl/remote/server_backups.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 9e13368..4f90515 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -64,14 +64,10 @@ Note: `parts` can also be defined as `null`. | Code | Description | | ---- | ----------------------------------------- | -| 202 | The response was successful. | +| 204 | The response was successful. | | 400 | The backup is already in completed state. | | 404 | The backup was not found. | -### Response example - -WIP. Is there even any? - 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) From 04a0bb97c1947701e1c27e12f3f54f746dec68ba Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 21:51:27 -0400 Subject: [PATCH 18/29] Added some missing stuff in SFTP body. --- pterodactyl/remote/sftp.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index f8e42a1..7cf16b6 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -4,11 +4,14 @@ Authenticate a set of credentials and return the associated server details for a ### Body -| Name | Visibility | Type | Description | -| -------- | ---------- | ------ | ------------------------------------------------------------------------------------------------ | -| type | required | string | Determine if the password should check authentication with either the "password" or "public_key". | -| username | required | string | The username of the user attempting to login. | -| password | required | string | The password of the user attempting to login. | +| Name | Visibility | Type | Description | +| -------------- | ---------- | ------ | ------------------------------------------------------------------------------------------------- | +| type | required | string | Determine if the password should check authentication with either the "password" or "public_key". | +| username | required | string | The username of the user attempting to login. | +| password | required | string | The password of the user attempting to login. | +| ip | optional | string | The remote address of the connection. | +| session_id | optional | []byte | The connection's session id. | +| client_version | optional | []byte | The connection's client version. | ### Responses From d5e8c0aa755eb049a353e08c83cb567a11616d82 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:18:34 -0400 Subject: [PATCH 19/29] Fixed incorrect description. --- pterodactyl/remote/server_backups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 4f90515..c57b86b 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -6,7 +6,7 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. | Name | Visibility | Description | | --------- | ---------- | ---------------------------------- | -| size | optional | The amount of backup URLs to give. | +| size | optional | The backup file size. | ### Responses From a14c3782b6a656c4d9fcadc0e25986f4249143fc Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Wed, 14 Jun 2023 22:22:43 -0400 Subject: [PATCH 20/29] I changed a description, and gave up on a response example. --- pterodactyl/remote/server_backups.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index c57b86b..0af2042 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -19,14 +19,7 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. ### Response examples -WIP. Add example data for 'parts'. (note: the response example below was not tested, and manually written based on the panel code.) - -```json -{ - "parts": [], - "part_size": 5368709120 -} -``` +WIP. Sources @@ -58,7 +51,7 @@ Handles updating the state of a backup. } ``` -Note: `parts` can also be defined as `null`. +Note: `parts` can also be defined as an array with objects with the keys `etag` (string) and `part_number` (number). ### Responses From fe9ce50515ccd9c33a1e5dd19202dbf9d0a479a5 Mon Sep 17 00:00:00 2001 From: Two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:16:58 -0400 Subject: [PATCH 21/29] Update pterodactyl/remote/sftp.md Co-authored-by: Devonte W --- pterodactyl/remote/sftp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index 7cf16b6..6a7b3f7 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -6,7 +6,7 @@ Authenticate a set of credentials and return the associated server details for a | Name | Visibility | Type | Description | | -------------- | ---------- | ------ | ------------------------------------------------------------------------------------------------- | -| type | required | string | Determine if the password should check authentication with either the "password" or "public_key". | +| type | optional | string | Determine if the password should check authentication with either the "password" or "public_key". | | username | required | string | The username of the user attempting to login. | | password | required | string | The password of the user attempting to login. | | ip | optional | string | The remote address of the connection. | From c1c771411e1aaf65f90eb0e31f8f71c760b1048d Mon Sep 17 00:00:00 2001 From: Two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:17:57 -0400 Subject: [PATCH 22/29] Update pterodactyl/remote/server_backups.md Co-authored-by: Devonte W --- pterodactyl/remote/server_backups.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 0af2042..f33157d 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -17,9 +17,6 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. | 404 | The backup was not found. | | 409 | The backup is already in completed state. | -### Response examples - -WIP. Sources From 6bf1360e588ece7cc14bf5589e69f9faf1ed0509 Mon Sep 17 00:00:00 2001 From: Two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:18:05 -0400 Subject: [PATCH 23/29] Update pterodactyl/remote/server_backups.md Co-authored-by: Devonte W --- pterodactyl/remote/server_backups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index f33157d..9467dd5 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -6,7 +6,7 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. | Name | Visibility | Description | | --------- | ---------- | ---------------------------------- | -| size | optional | The backup file size. | +| size | required | The backup file size. | ### Responses From c6609f795383bd75141c4be8caa5e937c933a0f0 Mon Sep 17 00:00:00 2001 From: Two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:18:16 -0400 Subject: [PATCH 24/29] Update pterodactyl/remote/server_backups.md Co-authored-by: Devonte W --- pterodactyl/remote/server_backups.md | 1 - 1 file changed, 1 deletion(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 9467dd5..982b775 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -22,7 +22,6 @@ Sources - [app/Http/Controllers/Api/Remote/Backups/BackupRemoteUpl2oadController.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` From 22af0d319eb9cd9892d2379defc31e99689ab694 Mon Sep 17 00:00:00 2001 From: Two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 07:32:36 -0400 Subject: [PATCH 25/29] Update sftp.md --- pterodactyl/remote/sftp.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pterodactyl/remote/sftp.md b/pterodactyl/remote/sftp.md index 6a7b3f7..d2db68b 100644 --- a/pterodactyl/remote/sftp.md +++ b/pterodactyl/remote/sftp.md @@ -8,10 +8,7 @@ Authenticate a set of credentials and return the associated server details for a | -------------- | ---------- | ------ | ------------------------------------------------------------------------------------------------- | | type | optional | string | Determine if the password should check authentication with either the "password" or "public_key". | | username | required | string | The username of the user attempting to login. | -| password | required | string | The password of the user attempting to login. | -| ip | optional | string | The remote address of the connection. | -| session_id | optional | []byte | The connection's session id. | -| client_version | optional | []byte | The connection's client version. | +| password | required | string | The password of the user attempting to login. ### Responses From bb70a411c03d872aee78d417bf42208293745cc6 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 23:21:50 -0400 Subject: [PATCH 26/29] Shortened 'script' in server_installation.md --- pterodactyl/remote/server_installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/remote/server_installation.md b/pterodactyl/remote/server_installation.md index fcdecb8..8caa914 100644 --- a/pterodactyl/remote/server_installation.md +++ b/pterodactyl/remote/server_installation.md @@ -124,7 +124,7 @@ Returns installation information for a server. "body": { "container_image": "openjdk:8-jdk-slim", "entrypoint": "bash", - "script": "#!/bin/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: /mnt/server\r\napt update\r\napt install -y curl jq\r\n\r\nif [[ ! -d /mnt/server ]]; then\r\n mkdir /mnt/server\r\nfi\r\n\r\ncd /mnt/server\r\n\r\n# Remove spaces from the version number to avoid issues with curl\r\nFORGE_VERSION=\"$(echo \"$FORGE_VERSION\" | tr -d ' ')\"\r\nMC_VERSION=\"$(echo \"$MC_VERSION\" | tr -d ' ')\"\r\n\r\nif [[ ! -z ${FORGE_VERSION} ]]; then\r\n DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION}\r\n FORGE_JAR=forge-${FORGE_VERSION}*.jar\r\nelse\r\n JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json)\r\n\r\n if [[ \"${MC_VERSION}\" == \"latest\" ]] || [[ \"${MC_VERSION}\" == \"\" ]]; then\r\n echo -e \"getting latest version of forge.\"\r\n MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains(\"latest\")) | split(\"-\")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)\r\n BUILD_TYPE=latest\r\n fi\r\n\r\n if [[ \"${BUILD_TYPE}\" != \"recommended\" ]] && [[ \"${BUILD_TYPE}\" != \"latest\" ]]; then\r\n BUILD_TYPE=recommended\r\n fi\r\n\r\n echo -e \"minecraft version: ${MC_VERSION}\"\r\n echo -e \"build type: ${BUILD_TYPE}\"\r\n\r\n ## some variables for getting versions and things\r\n FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" --arg BUILD_TYPE \"${BUILD_TYPE}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')\r\n\r\n ## locating the forge version\r\n if [[ \"${VERSION_KEY}\" == \"\" ]] && [[ \"${BUILD_TYPE}\" == \"recommended\" ]]; then\r\n echo -e \"dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested.\"\r\n VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION \"${MC_VERSION}\" '.promos | del(.\"latest-1.7.10\") | del(.\"1.7.10-latest-1.7.10\") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains(\"latest\"))')\r\n fi\r\n\r\n ## Error if the mc version set wasn't valid.\r\n if [ \"${VERSION_KEY}\" == \"\" ] || [ \"${VERSION_KEY}\" == \"null\" ]; then\r\n echo -e \"The install failed because there is no valid version of forge for the version of minecraft selected.\"\r\n exit 1\r\n fi\r\n\r\n FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY \"$VERSION_KEY\" '.promos | .[$VERSION_KEY]')\r\n\r\n if [[ \"${MC_VERSION}\" == \"1.7.10\" ]] || [[ \"${MC_VERSION}\" == \"1.8.9\" ]]; then\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar\r\n if [[ \"${MC_VERSION}\" == \"1.7.10\" ]]; then\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar\r\n fi\r\n else\r\n DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}\r\n FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar\r\n fi\r\nfi\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERV\njava -jar installer.jar --installServer || { echo -e \"\\nInstall failed using Forge version ${FORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}.\\nShould you be using unlimited memory value of 0, make sure to increase the default install resource limits in the Wings config or specify exact allocated memory in the server Build Configuration instead of 0! \\nOtherwise, the Forge installer will not have enough memory.\"; exit 4; }\r\n\r\n# Check if we need a symlink for 1.17+ Forge JPMS args\r\nif [[ $MC_VERSION =~ ^1\\.(17|18|19|20|21|22|23) || $FORGE_VERSION =~ ^1\\.(17|18|19|20|21|22|23) ]]; then\r\n unix_args\r\n\r\n# Check if someone has set MC to latest but overwrote it with older Forge version, otherwise we would have false positives\r\nelif [[ $MC_VERSION == \"latest\" && $FORGE_VERSION =~ ^1\\.(17|18|19|20|21|22|23) ]]; then\r\n unix_args\r\nelse\r\n # For versions below 1.17 that ship with jar\r\n mv $FORGE_JAR $SERVER_JARFILE\r\nfi\r\n\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar\r\necho -e \"Installation process is completed\"" + "script": "# Installation script here" } } ``` From 68a5100cf09e45df117c30d4044f019124b4e1ac Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 23:25:41 -0400 Subject: [PATCH 27/29] I made a separate page for activity events. --- pterodactyl/remote/activity_events.md | 65 ++++++++++++++++++++++++++ pterodactyl/remote/servers.md | 67 +-------------------------- 2 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 pterodactyl/remote/activity_events.md diff --git a/pterodactyl/remote/activity_events.md b/pterodactyl/remote/activity_events.md new file mode 100644 index 0000000..f787c87 --- /dev/null +++ b/pterodactyl/remote/activity_events.md @@ -0,0 +1,65 @@ +# Activity events + +Here are a list of activity events, which are used in the audit log feature. + +```text +server.backup.restore-failed +server:allocation.create +server:allocation.delete +server:allocation.notes +server:allocation.primary +server:backup.complete +server:backup.delete +server:backup.download +server:backup.fail +server:backup.lock +server:backup.restore +server:backup.restore-complete +server:backup.restore-failed +server:backup.restore-started +server:backup.start +server:backup.unlock +server:console.command +server:console.command +server:database.create +server:database.delete +server:database.rotate-password +server:file.compress +server:file.copy +server:file.create-directory +server:file.decompress +server:file.delete +server:file.download +server:file.pull +server:file.read +server:file.rename +server:file.uploaded +server:file.write +server:power.kill +server:power.restart +server:power.start +server:power.stop +server:reinstall +server:schedule.create +server:schedule.delete +server:schedule.execute +server:schedule.update +server:settings.description +server:settings.rename +server:sftp.create +server:sftp.create-directory +server:sftp.delete +server:sftp.denied +server:sftp.rename +server:sftp.write +server:startup.edit +server:startup.image +server:subuser.create +server:subuser.delete +server:subuser.update +server:task.create +server:task.delete +server:task.update + +* If there are any missing events, feel free to open a pull request. +``` diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index 8c8cde1..0d84ab6 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -202,75 +202,10 @@ Sources } ``` -Notes - -- Here is a list of all possible values for `event`. - -```text -server.backup.restore-failed -server:allocation.create -server:allocation.delete -server:allocation.notes -server:allocation.primary -server:backup.complete -server:backup.delete -server:backup.download -server:backup.fail -server:backup.lock -server:backup.restore -server:backup.restore-complete -server:backup.restore-failed -server:backup.restore-started -server:backup.start -server:backup.unlock -server:console.command -server:console.command -server:database.create -server:database.delete -server:database.rotate-password -server:file.compress -server:file.copy -server:file.create-directory -server:file.decompress -server:file.delete -server:file.download -server:file.pull -server:file.read -server:file.rename -server:file.uploaded -server:file.write -server:power.kill -server:power.restart -server:power.start -server:power.stop -server:reinstall -server:schedule.create -server:schedule.delete -server:schedule.execute -server:schedule.update -server:settings.description -server:settings.rename -server:sftp.create -server:sftp.create-directory -server:sftp.delete -server:sftp.denied -server:sftp.rename -server:sftp.write -server:startup.edit -server:startup.image -server:subuser.create -server:subuser.delete -server:subuser.update -server:task.create -server:task.delete -server:task.update - -* If there are any missing events, feel free to open a pull request. -``` - - `metadata` depends on the event. It can be null, a string, or a json blob with event specific metadata. - `ip` has to be an IP address or empty string. - `user` has to be a user UUID or undefined. +- `events` are activity events. You can find a list of them by [clicking here](activity_events.md). ### Responses From 2d526a96ce1a56209d2e4572695929154e9d5d51 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 23:32:52 -0400 Subject: [PATCH 28/29] WIP better body documentations for a backup route. --- pterodactyl/remote/server_backups.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 982b775..300a806 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -17,21 +17,26 @@ Returns the required presigned urls to upload a backup to S3 cloud storage. | 404 | The backup was not found. | | 409 | The backup is already in completed state. | - Sources - [app/Http/Controllers/Api/Remote/Backups/BackupRemoteUpl2oadController.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. | +| Name | Visibility | Type | Description | +| ------------------------ | --------------------------- | ------- | ------------------------------------------------------------------------------------------------------ | +| data | required | object | An object containing the checksum, checksum type, backup size, success state, and parts of the backup. | +| data.successful | required | boolean | The success state of the backup. | +| data.checksum | required if success is true | string | The checksum. | +| data.checksum_type | required if success is true | string | The checksum type. | +| data.size | required if success is true | number | The size of the backup. | +| data.parts | optional | array | An array containing the etag and part_number. | +| data.parts[].etag | required | string | ??? | +| data.parts[].part_number | required | number | ??? | ### Example Body From 3657fa46659f7085cf9c9a4ff5693c06d9c79934 Mon Sep 17 00:00:00 2001 From: real2two <26689496+real2two@users.noreply.github.com> Date: Tue, 27 Jun 2023 23:35:27 -0400 Subject: [PATCH 29/29] Update server_backups.md --- pterodactyl/remote/server_backups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index 300a806..872cab5 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -34,7 +34,7 @@ Handles updating the state of a backup. | data.checksum | required if success is true | string | The checksum. | | data.checksum_type | required if success is true | string | The checksum type. | | data.size | required if success is true | number | The size of the backup. | -| data.parts | optional | array | An array containing the etag and part_number. | +| data.parts | optional | array | An array containing the etag and part number for each part. | | data.parts[].etag | required | string | ??? | | data.parts[].part_number | required | number | ??? |