Skip to content

Comprehensive Pterodactyl Panel API documentation with multi-language examples. Covers Client, Application, and WebSocket endpoints. Built with Docusaurus 3.

License

Notifications You must be signed in to change notification settings

NETVPX/pterodactyl-api-docs

Repository files navigation

πŸš€ Pterodactyl API Documentation

Build Status Documentation API Tests Contributors MIT License

Complete API documentation and testing suite for Pterodactyl Panel v1.0+

Maintained by NETVPX and shared freely with the Pterodactyl community. This comprehensive documentation covers all API endpoints with multi-language examples, interactive testing, and detailed implementation guides.

πŸ“– View Live Documentation β†’

🎯 About This Project

This is the most comprehensive Pterodactyl API documentation available, featuring detailed coverage of all Pterodactyl Panel v1.0+ endpoints with production-ready examples.

🏒 API Coverage

  • πŸ‘₯ Client API (18 endpoints) - End-user server management, files, databases, backups, scheduling
  • πŸ”§ Application API (15+ endpoints) - Administrative panel management, users, nodes, servers
  • πŸ”Œ WebSocket API (5 endpoints) - Real-time console access, server statistics, live monitoring

✨ What Makes This Special

  • πŸ’― Production-Tested: All 38 endpoints tested against live Pterodactyl installations
  • 🌍 Multi-Language: Code examples in 8 programming languages for every endpoint
  • πŸ”„ Always Updated: Continuously verified against Pterodactyl's latest development branch
  • πŸšͺ Open Source: Community-driven with easy contribution workflow

πŸš€ Key Features

πŸ“š Documentation Excellence

  • Modern Stack: Built with Docusaurus 3 + TypeScript
  • Version Switcher: Support for multiple API versions (v1.0+ current, v0.7 legacy)
  • Responsive Design: Perfect experience on desktop, tablet, and mobile
  • Instant Search: Fast local search with auto-complete
  • Interactive Examples: Tabbed code samples with copy-to-clipboard
  • Live Testing: Every endpoint verified against real Pterodactyl panels

🌍 Multi-Language Support

8 Programming Languages for every API endpoint:

  • πŸ“ cURL - Command line HTTP client
  • 🟑 JavaScript - Node.js and browser examples
  • 🐍 Python - Using requests library
  • 🐘 PHP - cURL and Guzzle implementations
  • πŸ”΅ Go - Native HTTP client
  • β˜• Java - OkHttp library
  • πŸ”· C# - HttpClient implementation
  • πŸ”΄ Ruby - Net::HTTP examples

πŸ§ͺ Comprehensive Testing Suite

  • 38/38 Tests Passing: Complete endpoint coverage
  • Live API Validation: Tests run against actual Pterodactyl installations
  • Multiple Test Modes: Safe (read-only), partial, and full destructive testing
  • Automated Cleanup: Test resources automatically cleaned up
  • CI/CD Integration: GitHub Actions with comprehensive reporting

🀝 Open Source Community

  • Fork-First Workflow: Clear contribution guidelines
  • Issue Templates: Bug reports and feature requests
  • PR Templates: Structured review process
  • Active Maintenance: Regular updates and community support
  • πŸ’¬ Community Discussion: Integrated Giscus commenting system for documentation feedback

πŸ› οΈ Quick Start

πŸ” Using the Documentation

🌐 View Online: pterodactyl-api-docs.netvpx.com

πŸ“ Quick API Reference:

πŸ’» Local Development

Prerequisites:

  • Node.js 20.0+ (recommended: use nvm)
  • npm or yarn package manager
# 1. Fork the repository on GitHub first!
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/pterodactyl-api-docs.git
cd pterodactyl-api-docs

# 3. Install dependencies
npm install

# 4. Start development server
npm start
# β†’ Opens http://localhost:3000

# 5. Build for production
npm run build
# β†’ Generates static files in build/ directory

πŸ§ͺ API Testing Setup

# 1. Copy test configuration
cp .env.test.example .env.test

# 2. Configure your Pterodactyl panel details
nano .env.test

# 3. Run comprehensive API tests
cd tests && npm test
# β†’ Tests all 38 endpoints with detailed reporting

πŸ§ͺ API Testing

πŸ’― Comprehensive Test Coverage

38/38 endpoints tested against live Pterodactyl installations with detailed validation:

API Type Endpoints Status Coverage
Client API 18 tests βœ… Passing Account, servers, files, databases, backups, scheduling, network, users
Application API 15 tests βœ… Passing Users, servers, nodes, locations, nests/eggs, error handling
WebSocket API 5 tests βœ… Passing Authentication, connections, token management

πŸš€ Test Suite Features

  • πŸ”₯ Live API Validation: Tests against real Pterodactyl panels
  • πŸ›‘οΈ Safe Mode: Read-only tests for production environments
  • πŸ”„ Auto Cleanup: Test resources automatically cleaned up
  • πŸ“Š Performance Metrics: Response time monitoring
  • πŸ“ Detailed Logging: Full request/response analysis
  • πŸ› Schema Validation: Ensures API responses match documented formats

πŸƒβ€β™‚οΈ Running Tests

# Quick test run (safe mode - read only)
npm test -- --testNamePattern="list"

# Full destructive test suite
SAFE_MODE=false npm test

# Test specific endpoints
npm test -- --testNamePattern="servers"

πŸ€– CI/CD Integration

GitHub Actions automatically:

  • βœ… Build documentation on every commit
  • πŸ§ͺ Run test suite on pull requests
  • πŸ“Š Generate coverage reports
  • πŸ›‘οΈ Scan for security vulnerabilities
  • πŸš€ Deploy to production on main branch

Project Structure

β”œβ”€β”€ docs/                   # Documentation content
β”‚   β”œβ”€β”€ intro.md           # Introduction page
β”‚   β”œβ”€β”€ authentication.md  # Authentication guide
β”‚   β”œβ”€β”€ rate-limiting.md   # Rate limiting information
β”‚   β”œβ”€β”€ error-handling.md  # Error handling guide
β”‚   β”œβ”€β”€ contributing.md    # Contribution guidelines (within docs)
β”‚   └── api/               # API documentation
β”‚       β”œβ”€β”€ client/        # Client API endpoints
β”‚       β”œβ”€β”€ application/   # Application API endpoints
β”‚       └── websocket.md   # WebSocket API documentation
β”œβ”€β”€ tests/                 # Enhanced API testing suite
β”œβ”€β”€ static/                # Static assets (images, favicons, etc.)
β”œβ”€β”€ src/                   # React components and styling
β”œβ”€β”€ .github/               # GitHub templates and workflows
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/    # Bug report and improvement templates
β”‚   β”œβ”€β”€ workflows/         # GitHub Actions (build.yml)
β”‚   └── pull_request_template.md
β”œβ”€β”€ docusaurus.config.ts   # Docusaurus configuration
β”œβ”€β”€ sidebars.ts           # Sidebar configuration
β”œβ”€β”€ CONTRIBUTING.md        # Contribution guidelines
β”œβ”€β”€ LICENSE               # MIT License
└── package.json          # Dependencies and scripts

Multi-Language Support

All API endpoints include examples in 8 programming languages:

  • cURL - Command line HTTP client
  • JavaScript - Node.js and browser examples
  • Python - Using requests library
  • PHP - Using cURL and Guzzle
  • Go - Native HTTP client
  • Java - Using OkHttp
  • C# - Using HttpClient
  • Ruby - Using Net::HTTP

Examples are presented in an interactive tabbed interface for easy language switching.

API Documentation Coverage

Client API

  • Account management and authentication
  • Server power controls and resource monitoring
  • File management and operations
  • Database creation and management
  • Scheduled task automation
  • Network allocation management
  • User permissions and subuser management
  • Backup management

Application API

  • User administration
  • Server creation and management
  • Node and location management
  • Nest and egg configuration
  • System-wide settings

WebSocket API

  • Real-time server console access
  • Live server statistics
  • Event-based communication

Contributing

We welcome contributions from the community! This project is open source and we encourage developers to help improve the documentation.

Quick Contribution

For small fixes:

  1. Click "Edit this page" on any documentation page
  2. Make your changes in GitHub
  3. Submit a pull request

Larger Contributions

For significant changes:

  1. Read our Contributing Guidelines
  2. Check out our documentation contribution guide
  3. Fork the repository
  4. Create a feature branch
  5. Make your changes and test locally
  6. Submit a pull request using our template

Community Standards

  • All code examples must be tested and working
  • Follow the established multi-language format
  • Use CodeTabs component for code examples
  • Maintain NETVPX branding and style consistency

Automated Testing & CI/CD

  • GitHub Actions automatically build and test documentation
  • Pull Request Templates ensure quality contributions
  • Issue Templates for bug reports and improvements
  • Local Testing with comprehensive API test suite

Support

For support with this documentation:

Related Links

Recognition

Special thanks to all contributors who help make this documentation better for the Pterodactyl community!

License

This documentation is licensed under the MIT License. See the LICENSE file for details.

The Pterodactyl Panel software is licensed under the MIT License by the Pterodactyl Software team.


Maintained with ❀️ by NETVPX and shared freely with the Pterodactyl community.

About

Comprehensive Pterodactyl Panel API documentation with multi-language examples. Covers Client, Application, and WebSocket endpoints. Built with Docusaurus 3.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors