The Eggs API allows you to retrieve information about eggs, which are the configuration templates for specific game server types (e.g., Vanilla Minecraft, Spigot, Paper, etc.).
Eggs are read-only via the API. They cannot be created, updated, or deleted through the API. Eggs are managed through the admin panel or imported from external sources.
What is an Egg?
An egg contains all the configuration needed to run a specific type of game server:
Docker images to use
Startup command
Installation script
Configuration file templates
Environment variables
Resource requirements
List Eggs
Eggs are accessed through their parent nest. See Nests for listing eggs.
curl "https://panel.example.com/api/application/nests/{nest_id}/eggs" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Get Egg Details
curl "https://panel.example.com/api/application/nests/{nest_id}/eggs/{egg_id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Retrieves detailed information about a specific egg.
Path Parameters
The internal ID of the nest
The internal ID of the egg
Query Parameters
Include related resources. Available: nest, servers, config, script, variables
Response
Unique identifier for the egg
Email address of the egg author
Default Docker image (deprecated, use docker_images)
Available Docker images (key-value pairs of name and image)
Configuration settings Configuration file templates
Startup detection configuration
Command to stop the server
List of files users cannot edit
ID of egg this extends for config
Server startup command with variable placeholders
Installation script configuration Whether the installation requires privileged mode
Installation script content
Script entry point (e.g., “bash”)
Docker image for installation
ID of egg this extends for script
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
{
"object" : "egg" ,
"attributes" : {
"id" : 1 ,
"uuid" : "3c8e9d6f-4d5c-6e0f-af3h-1c5d6e7f8g9h" ,
"name" : "Vanilla Minecraft" ,
"nest" : 1 ,
"author" : "[email protected] " ,
"description" : "Minecraft is a game about placing blocks and going on adventures." ,
"docker_image" : "ghcr.io/pterodactyl/yolks:java_17" ,
"docker_images" : {
"Java 17" : "ghcr.io/pterodactyl/yolks:java_17" ,
"Java 11" : "ghcr.io/pterodactyl/yolks:java_11" ,
"Java 8" : "ghcr.io/pterodactyl/yolks:java_8"
},
"config" : {
"files" : {
"server.properties" : {
"parser" : "properties" ,
"find" : {
"server-ip" : "0.0.0.0" ,
"server-port" : "{{server.build.default.port}}" ,
"query.port" : "{{server.build.default.port}}"
}
}
},
"startup" : {
"done" : ")! For help, type "
},
"stop" : "stop" ,
"logs" : {},
"file_denylist" : [],
"extends" : null
},
"startup" : "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}" ,
"script" : {
"privileged" : true ,
"install" : "#!/bin/bash \n # Vanilla MC Installation Script \n apt update \n apt install -y curl jq \n\n cd /mnt/server \n\n VERSION=${VANILLA_VERSION} \n\n if [ \" ${VERSION} \" == \" latest \" ]; then \n VERSION=$(curl -s https://api.papermc.io/v2/projects/vanilla | jq -r '.versions[-1]') \n fi \n\n curl -o server.jar https://api.papermc.io/v2/projects/vanilla/versions/${VERSION}/builds/latest/downloads/vanilla-${VERSION}.jar \n " ,
"entry" : "bash" ,
"container" : "ghcr.io/pterodactyl/installers:alpine" ,
"extends" : null
},
"created_at" : "2024-01-01T00:00:00+00:00" ,
"updated_at" : "2024-02-15T00:00:00+00:00"
}
}
Get Egg Variables
curl "https://panel.example.com/api/application/nests/{nest_id}/eggs/{egg_id}?include=variables" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Retrieves the environment variables defined for an egg.
Response
When including variables, the response includes a relationships object with variable details:
{
"object" : "egg" ,
"attributes" : {
"id" : 1 ,
"name" : "Vanilla Minecraft" ,
"..." : "..."
},
"relationships" : {
"variables" : {
"object" : "list" ,
"data" : [
{
"object" : "egg_variable" ,
"attributes" : {
"id" : 1 ,
"egg_id" : 1 ,
"name" : "Server Jar File" ,
"description" : "The name of the server jar file to run." ,
"env_variable" : "SERVER_JARFILE" ,
"default_value" : "server.jar" ,
"user_viewable" : true ,
"user_editable" : true ,
"rules" : "required|string|max:20" ,
"created_at" : "2024-01-01T00:00:00+00:00" ,
"updated_at" : "2024-01-01T00:00:00+00:00"
}
},
{
"object" : "egg_variable" ,
"attributes" : {
"id" : 2 ,
"egg_id" : 1 ,
"name" : "Server Version" ,
"description" : "The version of Minecraft to download. Use 'latest' for the latest version." ,
"env_variable" : "VANILLA_VERSION" ,
"default_value" : "latest" ,
"user_viewable" : true ,
"user_editable" : true ,
"rules" : "required|string|max:20" ,
"created_at" : "2024-01-01T00:00:00+00:00" ,
"updated_at" : "2024-01-01T00:00:00+00:00"
}
}
]
}
}
}
Variable Object
Display name of the variable
Description of what the variable does
Environment variable name used in the startup command
Default value for the variable
Whether users can view this variable
Whether users can edit this variable
Validation rules (Laravel validation syntax)
Get Egg Configuration
curl "https://panel.example.com/api/application/nests/{nest_id}/eggs/{egg_id}?include=config" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Retrrieves detailed configuration information if the egg extends another egg.
Get Egg Script
curl "https://panel.example.com/api/application/nests/{nest_id}/eggs/{egg_id}?include=script" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Retrieves detailed script information if the egg extends another egg for its installation script.
Usage Examples
curl "https://panel.example.com/api/application/nests/1/eggs/1?include=variables,config,script,nest" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Find Eggs for Server Creation
# Get all eggs in the Minecraft nest with their variables
curl "https://panel.example.com/api/application/nests/1/eggs?include=variables" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
Check Available Docker Images
# Get egg details to see available Docker images
curl "https://panel.example.com/api/application/nests/1/eggs/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
| jq '.attributes.docker_images'
This will output:
{
"Java 17" : "ghcr.io/pterodactyl/yolks:java_17" ,
"Java 11" : "ghcr.io/pterodactyl/yolks:java_11" ,
"Java 8" : "ghcr.io/pterodactyl/yolks:java_8"
}