Expose the node's upload_size on the client server resource and reject files over it in the file manager before any bytes are sent.
669 lines
30 KiB
JSON
669 lines
30 KiB
JSON
[
|
|
{
|
|
"request": "GET /api/client",
|
|
"status": 200,
|
|
"body": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "server",
|
|
"attributes": {
|
|
"server_owner": true,
|
|
"identifier": "5e7f0003",
|
|
"__deprecated_uuid_short": "5e7f0003",
|
|
"server_identifier": "serv_lz7qaayaabaabaaaaaaaaaaaam",
|
|
"internal_id": 3,
|
|
"uuid": "5e7f0003-0000-4000-8000-000000000003",
|
|
"name": "Admin Lab",
|
|
"node": "node-beta",
|
|
"is_node_under_maintenance": true,
|
|
"upload_size": 256,
|
|
"sftp_details": {
|
|
"ip": "beta.example.test",
|
|
"port": 2222
|
|
},
|
|
"description": "Testing ground",
|
|
"limits": {
|
|
"memory": 512,
|
|
"swap": -1,
|
|
"disk": 1024,
|
|
"io": 10,
|
|
"cpu": 50,
|
|
"threads": null,
|
|
"oom_disabled": true
|
|
},
|
|
"invocation": "java -jar server.jar",
|
|
"docker_image": "ghcr.io/pterodactyl/yolks:java_21",
|
|
"egg_features": [
|
|
"eula",
|
|
"java_version"
|
|
],
|
|
"egg_tags": [
|
|
"minecraft",
|
|
"premium"
|
|
],
|
|
"feature_limits": {
|
|
"databases": 1,
|
|
"allocations": 1,
|
|
"backups": 1
|
|
},
|
|
"status": null,
|
|
"is_suspended": false,
|
|
"is_installing": false,
|
|
"is_transferring": false,
|
|
"skip_scripts": false,
|
|
"relationships": {
|
|
"allocations": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 8,
|
|
"ip": "198.51.100.20",
|
|
"ip_alias": null,
|
|
"port": 30001,
|
|
"notes": null,
|
|
"is_default": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Server Jar File",
|
|
"description": "The name of the server jarfile to run.",
|
|
"env_variable": "SERVER_JARFILE",
|
|
"default_value": "server.jar",
|
|
"server_value": null,
|
|
"is_editable": true,
|
|
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
|
|
}
|
|
},
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Build Number",
|
|
"description": "The build to download, or \"latest\".",
|
|
"env_variable": "BUILD_NUMBER",
|
|
"default_value": "latest",
|
|
"server_value": null,
|
|
"is_editable": false,
|
|
"rules": "required|string|max:20"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"pagination": {
|
|
"total": 1,
|
|
"count": 1,
|
|
"per_page": 50,
|
|
"current_page": 1,
|
|
"total_pages": 1,
|
|
"links": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"request": "GET /api/client?type=admin",
|
|
"status": 200,
|
|
"body": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "server",
|
|
"attributes": {
|
|
"server_owner": false,
|
|
"identifier": "5e7f0001",
|
|
"__deprecated_uuid_short": "5e7f0001",
|
|
"server_identifier": "serv_lz7qaaiaabaabaaaaaaaaaaaae",
|
|
"internal_id": 1,
|
|
"uuid": "5e7f0001-0000-4000-8000-000000000001",
|
|
"name": "Survival",
|
|
"node": "node-alpha",
|
|
"is_node_under_maintenance": false,
|
|
"upload_size": 100,
|
|
"sftp_details": {
|
|
"ip": "alpha.example.test",
|
|
"port": 2022
|
|
},
|
|
"description": "Main survival world",
|
|
"limits": {
|
|
"memory": 2048,
|
|
"swap": 512,
|
|
"disk": 10240,
|
|
"io": 500,
|
|
"cpu": 200,
|
|
"threads": "0-3",
|
|
"oom_disabled": true
|
|
},
|
|
"invocation": "java -Xms128M -Xmx2048M -jar paper.jar",
|
|
"docker_image": "ghcr.io/pterodactyl/yolks:java_21",
|
|
"egg_features": [
|
|
"eula",
|
|
"java_version"
|
|
],
|
|
"egg_tags": [
|
|
"minecraft",
|
|
"premium"
|
|
],
|
|
"feature_limits": {
|
|
"databases": 5,
|
|
"allocations": 5,
|
|
"backups": 5
|
|
},
|
|
"status": null,
|
|
"is_suspended": false,
|
|
"is_installing": false,
|
|
"is_transferring": false,
|
|
"skip_scripts": false,
|
|
"relationships": {
|
|
"allocations": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 1,
|
|
"ip": "192.0.2.10",
|
|
"ip_alias": "play.example.test",
|
|
"port": 25565,
|
|
"notes": "Primary <game> port",
|
|
"is_default": true
|
|
}
|
|
},
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 2,
|
|
"ip": "192.0.2.10",
|
|
"ip_alias": null,
|
|
"port": 25566,
|
|
"notes": "Query/RCON",
|
|
"is_default": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Server Jar File",
|
|
"description": "The name of the server jarfile to run.",
|
|
"env_variable": "SERVER_JARFILE",
|
|
"default_value": "server.jar",
|
|
"server_value": "paper.jar",
|
|
"is_editable": true,
|
|
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
|
|
}
|
|
},
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Build Number",
|
|
"description": "The build to download, or \"latest\".",
|
|
"env_variable": "BUILD_NUMBER",
|
|
"default_value": "latest",
|
|
"server_value": null,
|
|
"is_editable": false,
|
|
"rules": "required|string|max:20"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "server",
|
|
"attributes": {
|
|
"server_owner": false,
|
|
"identifier": "5e7f0002",
|
|
"__deprecated_uuid_short": "5e7f0002",
|
|
"server_identifier": "serv_lz7qaaqaabaabaaaaaaaaaaaai",
|
|
"internal_id": 2,
|
|
"uuid": "5e7f0002-0000-4000-8000-000000000002",
|
|
"name": "Creative",
|
|
"node": "node-alpha",
|
|
"is_node_under_maintenance": false,
|
|
"upload_size": 100,
|
|
"sftp_details": {
|
|
"ip": "alpha.example.test",
|
|
"port": 2022
|
|
},
|
|
"description": "",
|
|
"limits": {
|
|
"memory": 1024,
|
|
"swap": 0,
|
|
"disk": 5120,
|
|
"io": 500,
|
|
"cpu": 0,
|
|
"threads": null,
|
|
"oom_disabled": false
|
|
},
|
|
"invocation": "java -jar child.jar",
|
|
"docker_image": "ghcr.io/pterodactyl/yolks:java_17",
|
|
"egg_features": [
|
|
"eula",
|
|
"java_version"
|
|
],
|
|
"egg_tags": [
|
|
"minecraft"
|
|
],
|
|
"feature_limits": {
|
|
"databases": 0,
|
|
"allocations": null,
|
|
"backups": 0
|
|
},
|
|
"status": "installing",
|
|
"is_suspended": false,
|
|
"is_installing": true,
|
|
"is_transferring": true,
|
|
"skip_scripts": true,
|
|
"relationships": {
|
|
"allocations": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 3,
|
|
"ip": "192.0.2.10",
|
|
"ip_alias": null,
|
|
"port": 25567,
|
|
"notes": null,
|
|
"is_default": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Server Jar File",
|
|
"description": "The jar the child egg runs.",
|
|
"env_variable": "SERVER_JARFILE",
|
|
"default_value": "child.jar",
|
|
"server_value": "child.jar",
|
|
"is_editable": true,
|
|
"rules": "required|string"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"pagination": {
|
|
"total": 2,
|
|
"count": 2,
|
|
"per_page": 50,
|
|
"current_page": 1,
|
|
"total_pages": 1,
|
|
"links": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"request": "GET /api/client?type=admin-all&per_page=2&include=egg",
|
|
"status": 200,
|
|
"body": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "server",
|
|
"attributes": {
|
|
"server_owner": false,
|
|
"identifier": "5e7f0001",
|
|
"__deprecated_uuid_short": "5e7f0001",
|
|
"server_identifier": "serv_lz7qaaiaabaabaaaaaaaaaaaae",
|
|
"internal_id": 1,
|
|
"uuid": "5e7f0001-0000-4000-8000-000000000001",
|
|
"name": "Survival",
|
|
"node": "node-alpha",
|
|
"is_node_under_maintenance": false,
|
|
"upload_size": 100,
|
|
"sftp_details": {
|
|
"ip": "alpha.example.test",
|
|
"port": 2022
|
|
},
|
|
"description": "Main survival world",
|
|
"limits": {
|
|
"memory": 2048,
|
|
"swap": 512,
|
|
"disk": 10240,
|
|
"io": 500,
|
|
"cpu": 200,
|
|
"threads": "0-3",
|
|
"oom_disabled": true
|
|
},
|
|
"invocation": "java -Xms128M -Xmx2048M -jar paper.jar",
|
|
"docker_image": "ghcr.io/pterodactyl/yolks:java_21",
|
|
"egg_features": [
|
|
"eula",
|
|
"java_version"
|
|
],
|
|
"egg_tags": [
|
|
"minecraft",
|
|
"premium"
|
|
],
|
|
"feature_limits": {
|
|
"databases": 5,
|
|
"allocations": 5,
|
|
"backups": 5
|
|
},
|
|
"status": null,
|
|
"is_suspended": false,
|
|
"is_installing": false,
|
|
"is_transferring": false,
|
|
"skip_scripts": false,
|
|
"relationships": {
|
|
"allocations": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 1,
|
|
"ip": "192.0.2.10",
|
|
"ip_alias": "play.example.test",
|
|
"port": 25565,
|
|
"notes": "Primary <game> port",
|
|
"is_default": true
|
|
}
|
|
},
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 2,
|
|
"ip": "192.0.2.10",
|
|
"ip_alias": null,
|
|
"port": 25566,
|
|
"notes": "Query/RCON",
|
|
"is_default": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Server Jar File",
|
|
"description": "The name of the server jarfile to run.",
|
|
"env_variable": "SERVER_JARFILE",
|
|
"default_value": "server.jar",
|
|
"server_value": "paper.jar",
|
|
"is_editable": true,
|
|
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
|
|
}
|
|
},
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Build Number",
|
|
"description": "The build to download, or \"latest\".",
|
|
"env_variable": "BUILD_NUMBER",
|
|
"default_value": "latest",
|
|
"server_value": null,
|
|
"is_editable": false,
|
|
"rules": "required|string|max:20"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"egg": {
|
|
"object": "egg",
|
|
"attributes": {
|
|
"uuid": "e9900001-0000-4000-8000-000000000001",
|
|
"name": "Paper"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"object": "server",
|
|
"attributes": {
|
|
"server_owner": false,
|
|
"identifier": "5e7f0002",
|
|
"__deprecated_uuid_short": "5e7f0002",
|
|
"server_identifier": "serv_lz7qaaqaabaabaaaaaaaaaaaai",
|
|
"internal_id": 2,
|
|
"uuid": "5e7f0002-0000-4000-8000-000000000002",
|
|
"name": "Creative",
|
|
"node": "node-alpha",
|
|
"is_node_under_maintenance": false,
|
|
"upload_size": 100,
|
|
"sftp_details": {
|
|
"ip": "alpha.example.test",
|
|
"port": 2022
|
|
},
|
|
"description": "",
|
|
"limits": {
|
|
"memory": 1024,
|
|
"swap": 0,
|
|
"disk": 5120,
|
|
"io": 500,
|
|
"cpu": 0,
|
|
"threads": null,
|
|
"oom_disabled": false
|
|
},
|
|
"invocation": "java -jar child.jar",
|
|
"docker_image": "ghcr.io/pterodactyl/yolks:java_17",
|
|
"egg_features": [
|
|
"eula",
|
|
"java_version"
|
|
],
|
|
"egg_tags": [
|
|
"minecraft"
|
|
],
|
|
"feature_limits": {
|
|
"databases": 0,
|
|
"allocations": null,
|
|
"backups": 0
|
|
},
|
|
"status": "installing",
|
|
"is_suspended": false,
|
|
"is_installing": true,
|
|
"is_transferring": true,
|
|
"skip_scripts": true,
|
|
"relationships": {
|
|
"allocations": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 3,
|
|
"ip": "192.0.2.10",
|
|
"ip_alias": null,
|
|
"port": 25567,
|
|
"notes": null,
|
|
"is_default": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Server Jar File",
|
|
"description": "The jar the child egg runs.",
|
|
"env_variable": "SERVER_JARFILE",
|
|
"default_value": "child.jar",
|
|
"server_value": "child.jar",
|
|
"is_editable": true,
|
|
"rules": "required|string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"egg": {
|
|
"object": "egg",
|
|
"attributes": {
|
|
"uuid": "e9900002-0000-4000-8000-000000000002",
|
|
"name": "Paper Child"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"pagination": {
|
|
"total": 3,
|
|
"count": 2,
|
|
"per_page": 2,
|
|
"current_page": 1,
|
|
"total_pages": 2,
|
|
"links": {
|
|
"next": "https://panel.example.test/api/client?type=admin-all&per_page=2&include=egg&page=2"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"request": "GET /api/client?type=admin-all&per_page=2&page=2",
|
|
"status": 200,
|
|
"body": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "server",
|
|
"attributes": {
|
|
"server_owner": true,
|
|
"identifier": "5e7f0003",
|
|
"__deprecated_uuid_short": "5e7f0003",
|
|
"server_identifier": "serv_lz7qaayaabaabaaaaaaaaaaaam",
|
|
"internal_id": 3,
|
|
"uuid": "5e7f0003-0000-4000-8000-000000000003",
|
|
"name": "Admin Lab",
|
|
"node": "node-beta",
|
|
"is_node_under_maintenance": true,
|
|
"upload_size": 256,
|
|
"sftp_details": {
|
|
"ip": "beta.example.test",
|
|
"port": 2222
|
|
},
|
|
"description": "Testing ground",
|
|
"limits": {
|
|
"memory": 512,
|
|
"swap": -1,
|
|
"disk": 1024,
|
|
"io": 10,
|
|
"cpu": 50,
|
|
"threads": null,
|
|
"oom_disabled": true
|
|
},
|
|
"invocation": "java -jar server.jar",
|
|
"docker_image": "ghcr.io/pterodactyl/yolks:java_21",
|
|
"egg_features": [
|
|
"eula",
|
|
"java_version"
|
|
],
|
|
"egg_tags": [
|
|
"minecraft",
|
|
"premium"
|
|
],
|
|
"feature_limits": {
|
|
"databases": 1,
|
|
"allocations": 1,
|
|
"backups": 1
|
|
},
|
|
"status": null,
|
|
"is_suspended": false,
|
|
"is_installing": false,
|
|
"is_transferring": false,
|
|
"skip_scripts": false,
|
|
"relationships": {
|
|
"allocations": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "allocation",
|
|
"attributes": {
|
|
"id": 8,
|
|
"ip": "198.51.100.20",
|
|
"ip_alias": null,
|
|
"port": 30001,
|
|
"notes": null,
|
|
"is_default": true
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Server Jar File",
|
|
"description": "The name of the server jarfile to run.",
|
|
"env_variable": "SERVER_JARFILE",
|
|
"default_value": "server.jar",
|
|
"server_value": null,
|
|
"is_editable": true,
|
|
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
|
|
}
|
|
},
|
|
{
|
|
"object": "egg_variable",
|
|
"attributes": {
|
|
"name": "Build Number",
|
|
"description": "The build to download, or \"latest\".",
|
|
"env_variable": "BUILD_NUMBER",
|
|
"default_value": "latest",
|
|
"server_value": null,
|
|
"is_editable": false,
|
|
"rules": "required|string|max:20"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"pagination": {
|
|
"total": 3,
|
|
"count": 1,
|
|
"per_page": 2,
|
|
"current_page": 2,
|
|
"total_pages": 2,
|
|
"links": {
|
|
"previous": "https://panel.example.test/api/client?type=admin-all&per_page=2&page=1"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|