REST API
AryaPanel expose REST API berbasis Pterodactyl. Endpoint utama:
https://panel.aryapanel.xyz/api/Autentikasi
Semua request butuh header:
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Content-Type: application/jsonBuat API key:
- Application API (admin): Admin → Application API → Create New
- Client API (user): Account → API Credentials → Create New
Format response
Semua response JSON dengan format:
json
{
"object": "list",
"data": [
{
"object": "server",
"attributes": { ... }
}
],
"meta": {
"pagination": {
"total": 42,
"count": 25,
"per_page": 25,
"current_page": 1,
"total_pages": 2
}
}
}Rate limit
Default: 240 request per menit per API key. Kalau exceeded, response 429 Too Many Requests.
Contoh: list servers (Client API)
bash
curl -H "Authorization: Bearer ptlc_..." \
-H "Accept: application/json" \
https://panel.aryapanel.xyz/api/clientResponse:
json
{
"object": "list",
"data": [
{
"object": "server",
"attributes": {
"server_owner": true,
"identifier": "abc12345",
"uuid": "abc12345-...-...-...",
"name": "Server Minecraft Saya",
"node": "node-jkt-1",
"status": null,
"limits": {
"memory": 4096,
"swap": 0,
"disk": 20000,
"cpu": 200
}
}
}
]
}Contoh: kirim command ke console
bash
curl -X POST \
-H "Authorization: Bearer ptlc_..." \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"command": "say Hello"}' \
https://panel.aryapanel.xyz/api/client/servers/abc12345/commandContoh: start/stop server
bash
curl -X POST \
-H "Authorization: Bearer ptlc_..." \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"signal": "start"}' \
https://panel.aryapanel.xyz/api/client/servers/abc12345/powersignal bisa: start, stop, restart, kill.
Contoh: get resource usage
bash
curl -H "Authorization: Bearer ptlc_..." \
-H "Accept: application/json" \
https://panel.aryapanel.xyz/api/client/servers/abc12345/resourcesResponse:
json
{
"object": "stats",
"attributes": {
"current_state": "running",
"resources": {
"memory_bytes": 512000000,
"cpu_absolute": 24.5,
"disk_bytes": 1200000000,
"network_rx_bytes": 12000,
"network_tx_bytes": 24000,
"uptime": 3600000
}
}
}Contoh: create server (Application API)
bash
curl -X POST \
-H "Authorization: Bearer ptla_..." \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "Server Baru",
"user": 1,
"egg": 3,
"docker_image": "ghcr.io/pterodactyl/yolks:java_21",
"startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}",
"environment": {
"SERVER_JARFILE": "server.jar",
"VANILLA_VERSION": "latest"
},
"limits": {
"memory": 2048,
"swap": 0,
"disk": 10000,
"io": 500,
"cpu": 100
},
"feature_limits": {
"databases": 1,
"backups": 3,
"allocations": 1
},
"allocation": {
"default": 1
}
}' \
https://panel.aryapanel.xyz/api/application/serversWebSocket
Untuk console real-time, pakai WebSocket. Dapatkan URL + token dulu:
bash
GET /api/client/servers/{server}/websocketResponse:
json
{
"data": {
"token": "eyJ...",
"socket": "wss://node1.aryapanel.xyz:8080/api/servers/abc12345/ws"
}
}Lalu connect via WebSocket dan kirim frame:
json
{ "event": "auth", "args": ["eyJ..."] }Setelah authenticated, listen event console output, dan kirim event send command, set state, dll.
Endpoint utama (Client API)
| Method | Endpoint | Fungsi |
|---|---|---|
GET | /api/client | List server yang bisa diakses user |
GET | /api/client/servers/{id} | Detail server |
GET | /api/client/servers/{id}/resources | Resource usage |
POST | /api/client/servers/{id}/power | Start/stop/restart/kill |
POST | /api/client/servers/{id}/command | Kirim command console |
GET | /api/client/servers/{id}/files/list | List file |
GET | /api/client/servers/{id}/files/contents | Baca file |
POST | /api/client/servers/{id}/files/write | Tulis file |
GET | /api/client/servers/{id}/backups | List backup |
POST | /api/client/servers/{id}/backups | Buat backup |
GET | /api/client/servers/{id}/databases | List database |
POST | /api/client/servers/{id}/databases | Buat database |
SDK
Beberapa community SDK:
- Node.js:
pterodactyl-nodejs - Python:
pydactyl - Go:
crocgodyl
Full reference
Reference lengkap ada di dokumentasi Pterodactyl API.