Skip to main content
Version: v1.0+

Source Code References

Most API endpoints documented in this guide includes references to the actual implementation in the Pterodactyl Panel source code. This helps developers understand how the API works internally and provides a way to verify the accuracy of our documentation.

How to Use Source References

📂 Repository Structure

The Pterodactyl Panel is open source and available on GitHub:

🗂️ Key Directories

DirectoryPurposeContains
app/Http/Controllers/Api/Client/Client API ControllersUser-facing server management endpoints
app/Http/Controllers/Api/Application/Application API ControllersAdministrative panel management endpoints
routes/api-client.phpClient API RoutesRoute definitions for client endpoints
routes/api-application.phpApplication API RoutesRoute definitions for admin endpoints
app/Models/Data ModelsDatabase models and relationships
app/Services/Business LogicComplex operations and business rules

Understanding Source References

📍 Reference Format

Each endpoint includes these source references:

### Source Reference
- **Method**: [`ControllerName@methodName`](link-to-github)
- **Route**: [`HTTP_METHOD /api/path`](link-to-route-definition)
- **Service**: [`ServiceClassName`](link-to-service-class)

🎯 Example Breakdown

For the "List Users" endpoint:

### Source Reference
- **Method**: [`UserController@index`](https://github.com/pterodactyl/panel/blob/1.0-develop/app/Http/Controllers/Api/Application/Users/UserController.php#L47)
- **Route**: [`GET /api/application/users`](https://github.com/pterodactyl/panel/blob/1.0-develop/routes/api-application.php#L45)

This tells you:

  • Controller Method: The index method in UserController handles this request
  • Route Definition: Line 45 in api-application.php defines this route
  • GitHub Links: Direct links to the exact lines of code

API Implementation Patterns

🔄 Common Controller Methods

MethodPurposeHTTP Verb
indexList resourcesGET
show / viewGet single resourceGET
storeCreate new resourcePOST
updateUpdate existing resourcePATCH/PUT
destroy / deleteDelete resourceDELETE

🛡️ Authentication & Middleware

All API endpoints use these middleware components:

🔧 Service Layer Pattern

Complex operations are handled by service classes:

Wings Daemon Integration

🚀 Wings Communication

Many endpoints communicate with the Wings daemon:

🔗 Panel-Wings Communication

graph LR
A[Panel API] --> B[Repository Layer]
B --> C[HTTP Client]
C --> D[Wings Daemon]
D --> E[Docker Container]

📋 Client API Controllers

FeatureControllerGitHub Link
Server ListClientControllerView Code
Server DetailsServerControllerView Code
Power ManagementPowerControllerView Code
File ManagementFileControllerView Code
Database ManagementDatabaseControllerView Code
Backup ManagementBackupControllerView Code

🔧 Application API Controllers

FeatureControllerGitHub Link
User ManagementUserControllerView Code
Server ManagementServerControllerView Code
Node ManagementNodeControllerView Code
Location ManagementLocationControllerView Code

Contributing to Pterodactyl

🤝 How to Contribute

If you find issues or want to improve the Panel:

  1. Report Issues: Panel Issues
  2. Submit Pull Requests: Contributing Guide
  3. Join Discord: Pterodactyl Community

📚 Development Setup

Version Information

📅 Current References

All source references in this documentation point to:

  • Branch: 1.0-develop (Pterodactyl v1 stable development branch)
  • Panel Version: v1.11.x
  • Wings Version: v1.11.x

⚠️ Version Notes

  • Links point to the develop branch for the latest features
  • For stable releases, change develop to the specific version tag (e.g., v1.11.5)
  • Some features may only be available in newer versions