Skip to main content
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

nest_id
integer
required
The internal ID of the nest
egg_id
integer
required
The internal ID of the egg

Query Parameters

include
string
Include related resources. Available: nest, servers, config, script, variables

Response

object
string
Always egg
attributes
object
{
  "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\napt update\napt install -y curl jq\n\ncd /mnt/server\n\nVERSION=${VANILLA_VERSION}\n\nif [ \"${VERSION}\" == \"latest\" ]; then\n    VERSION=$(curl -s https://api.papermc.io/v2/projects/vanilla | jq -r '.versions[-1]')\nfi\n\ncurl -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

id
integer
Internal variable ID
egg_id
integer
ID of the parent egg
name
string
Display name of the variable
description
string
Description of what the variable does
env_variable
string
Environment variable name used in the startup command
default_value
string
Default value for the variable
user_viewable
boolean
Whether users can view this variable
user_editable
boolean
Whether users can edit this variable
rules
string
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

Get All Information for an Egg

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"
}

Build docs developers (and LLMs) love