diff --git a/pterodactyl/application/users.md b/pterodactyl/application/users.md index cfc0e47..416fe3d 100644 --- a/pterodactyl/application/users.md +++ b/pterodactyl/application/users.md @@ -157,7 +157,7 @@ Creates a user. | Code | Description | | ---- | ------------------------------------ | -| 200 | The request was successful. | +| 201 | The request was successful. | | 422 | One or more validation rules failed. | ### Sources diff --git a/pterodactyl/remote/server_backups.md b/pterodactyl/remote/server_backups.md index c504769..2c5993e 100644 --- a/pterodactyl/remote/server_backups.md +++ b/pterodactyl/remote/server_backups.md @@ -27,6 +27,17 @@ 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. | +### Example Response + +```json +{ + "parts": [ + "https://example.com/s3_url_here" + ], + "part_size": 1234 +} +``` + ### Sources - [BackupRemoteUploadController.php#L33](https://github.com/pterodactyl/panel/blob/43f7c106172a68f9d81c84af34735373dc900395/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php#L33) @@ -39,28 +50,30 @@ 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. | -| 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 for each part. | -| data.parts[].etag | required | string | The entity tag of an upload part. (for S3) | -| data.parts[].part_number | required | number | The part number of an upload part. (for S3) | +| Name | Visibility | Type | Description | +| ------------------- | --------------------------- | ------- | ----------------------------------------------------------- | +| successful | required | boolean | The success state of the backup. | +| checksum | required if success is true | string | The checksum. | +| checksum_type | required if success is true | string | The checksum type. | +| size | required if success is true | number | The size of the backup. | +| parts | optional | array | An array containing the etag and part number for each part. | +| parts[].etag | required | string | The entity tag of an upload part. (for S3) | +| parts[].part_number | required | number | The part number of an upload part. (for S3) | ### Example Body ```json { - "data": { - "checksum": "a0b124c3def45g67890h12i3j4567k8l9mn01234", - "checksum_type": "sha1", - "size": 1234, - "successful": true, - "parts": null - } + "checksum": "a0b124c3def45g67890h12i3j4567k8l9mn01234", + "checksum_type": "sha1", + "size": 1234, + "successful": true, + "parts": [ + { + "etag": "\"fad65ead865d78b768d313644d411c16\"", + "part_number": 1 + } + ] } ``` diff --git a/pterodactyl/remote/servers.md b/pterodactyl/remote/servers.md index 4edb49f..ddbcd2c 100644 --- a/pterodactyl/remote/servers.md +++ b/pterodactyl/remote/servers.md @@ -75,7 +75,13 @@ Lists all servers with their configurations that are assigned to the requesting "192.168.228.1": [25565] } }, - "mounts": [], + "mounts": [ + { + "source": "/root/mnt", + "target": "/root/mnt", + "read_only": false + } + ], "egg": { "id": "b3e7a6b9-1cc9-4d3e-9372-88b6d96c6b0f", "file_denylist": [] @@ -159,6 +165,9 @@ Lists all servers with their configurations that are assigned to the requesting } ``` +> [!TIP] +> The `mounts` field can also be defined as an array of objects with the fields `source` (string), `target` (string) and `read_only` (boolean). + ### Sources - [ServerDetailsController.php#L48](https://github.com/pterodactyl/panel/blob/43f7c106172a68f9d81c84af34735373dc900395/app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php#L48) diff --git a/wings/server.md b/wings/server.md index 20c7d11..2af489d 100644 --- a/wings/server.md +++ b/wings/server.md @@ -139,8 +139,31 @@ Sources: - [router/router_server.go#L142](https://github.com/pterodactyl/wings/blob/release/v1.11.2/router/router_server.go#L142) +### `POST /api/deauthorize-user` + +Disconnects user from server websockets and SFTP sessions. + +### Body + +| Field | Visibility | Type | Description | +| -------- | ---------- | --------------- | ------------------------------- | +| user | required | string | The UUID of the user to deny. | +| servers | required | array of string | A list of server UUIDs to deny. | + +### Responses + +| Code | Description | +| ---- | --------------------------- | +| 204 | The request was successful. | + +Sources: + +- [router/router_system.go#L159](https://github.com/pterodactyl/wings/blob/a97e8ae09fd682057ef229d4940d6dcb0cdaf3af/router/router_system.go#L159) + ### `POST /api/servers/:uuid/ws/deny` +> Deprecated. Use `POST /api/deauthorize-user` instead. + Adds the given JWT IDs (or "jti"s) to the server websocket's deny list, preventing tokens with the JTIs from connecting or interacting with the server websocket. ### Body diff --git a/wings/server_backups.md b/wings/server_backups.md index 362b9ba..f2ca9db 100644 --- a/wings/server_backups.md +++ b/wings/server_backups.md @@ -39,7 +39,7 @@ Sources: ### `DELETE /api/servers/:uuid/backup/:id` -Deletes a specified backup from a server. +Deletes a specified local backup from a server. ### Responses @@ -51,3 +51,6 @@ Deletes a specified backup from a server. Sources: - [router_server_backup.go#L178](https://github.com/pterodactyl/wings/blob/release/v1.11.2/router/router_server_backup.go#L178) + +> [!INFORMATION] +> This is only used when the backup adapter is `wings`. If you're looking for how `s3` backups are deleted, check out [/app/Services/Backups/DeleteBackupService.php](https://github.com/pterodactyl/panel/blob/1570ff250939b75b3ba8cd03e5025d8293544ed4/app/Services/Backups/DeleteBackupService.php#L68) on the panel instead.