REST HTTP API
Imagine controlling your Minecraft server from a web dashboard, a Discord bot, or even a custom mobile app. The REST HTTP API add-on makes this a reality by exposing your server’s command interface through modern HTTP endpoints. Whether you’re an experienced server admin or a developer building tools for a community, this plugin bridges the gap between Minecraft and the outside world with elegance and security.
What is REST HTTP API for Minecraft?
At its core, REST HTTP API for Minecraft is a Paper plugin that launches a lightweight HTTP server inside your Minecraft process. It listens for RESTful requests and translates them into server commands, then returns the results as structured JSON. This means you can remotely execute any console command, query player lists, or even trigger complex automation scripts without ever logging into the server console. The plugin also generates interactive API documentation, so you can explore endpoints right from your browser.
Key Features
- Command Execution via HTTP – Send POST requests to run any server command and receive the output instantly.
- Bearer Token Authentication – Protect your endpoints with a configurable secret token, ensuring only authorized clients can interact with your server.
- Command Queuing for Offline Players – Queue commands for players who are not currently online; the plugin executes them as soon as the player joins.
- Server Information Endpoints – Retrieve real-time data like online player lists, server version, and uptime through simple GET requests.
- Auto-Generated Swagger Documentation – Access a fully interactive API doc page that lets you test endpoints directly, making integration a breeze.
- Lightweight and Focused – Built specifically for Paper servers, it adds minimal overhead and stays out of the way when not in use.
Supported Minecraft Versions and Loaders
The REST HTTP API is designed for Paper and its forks (such as Purpur, Pufferfish, etc.). While it may work on Spigot or Bukkit, those platforms are not officially tested. The plugin requires Java 17 or higher and is compatible with modern Minecraft versions (1.18+). Always check the release notes for the exact version support when you download REST HTTP API.
How to Install REST HTTP API
Installing the plugin is straightforward. First, ensure your server is running a supported Paper-based build and Java 17. Then follow these steps:
- Visit the official releases page and download REST HTTP API – look for the latest
.jarfile. - Place the downloaded
http-commands-*.jarinto your server’spluginsfolder. - Restart the server or run
plugman load RESTHttpAPIif you have a plugin manager. - After the first launch, a configuration file will be generated at
plugins/http-commands/config.yml.
For those who prefer a streamlined setup, the foxygame.net launcher offers a one-click install option for REST HTTP API, automatically handling version compatibility and keeping the add-on updated alongside your server. This can save time and reduce configuration errors, especially if you manage multiple plugins.
Configuration and Security
Once installed, open the config.yml file to customize the plugin. The most critical setting is the bearer token – change the default value to a long, random string. This token must be included in the Authorization header of every API request. Additionally, consider these security best practices:
- Use HTTPS – Always place the API behind a reverse proxy like Nginx or Caddy with TLS/SSL encryption. The plugin itself listens on HTTP (default port 8080), so the proxy handles secure connections.
- Restrict Access by IP – Configure your firewall or the reverse proxy to only allow requests from trusted sources.
- Limit Permissions – The
/http-commands reloadcommand requires thehttpcommands.reloadpermission; grant it only to trusted operators.
A sample Nginx reverse proxy configuration is provided in the plugin documentation, making it easy to set up a secure public endpoint.
Using the API
After securing the server, you can start sending requests. For example, to get a list of online players, you would send a GET request to /api/v1/players with the Authorization header. To execute a command, POST to /api/v1/command with a JSON body like {"command": "say Hello from the web!"}. The interactive API documentation, accessible at the configured base URL, lets you try these calls directly in your browser – a huge time-saver during development.
The plugin also supports command queuing. If you need to give a player an item but they are offline, you can queue the command. The server will execute it the moment that player logs in, perfect for reward systems or automated welcome messages.
Integrating with External Tools
The real power of REST HTTP API for Minecraft shines when you connect it to web dashboards, Discord bots, or monitoring systems. For instance, you can build a simple web panel that shows server status and lets moderators issue kicks or bans without giving them full console access. Developers can use the API to create custom automation scripts – restart the server at low player counts, send alerts to a Slack channel, or sync in-game events with a database. The possibilities are endless, and the clean RESTful design makes integration painless.
Building from Source
If you prefer to compile the plugin yourself, the source code is available on GitHub. Clone the repository and run ./gradlew build to produce the JAR. You can also generate the API documentation locally with ./gradlew openApiGenerate. The project is open-source under the MIT License, so you can audit the code or contribute improvements.
Conclusion
The REST HTTP API add-on transforms your Minecraft server into a programmable platform. With secure token authentication, command queuing, and auto-generated docs, it’s a must-have for any server owner looking to automate tasks or integrate with external services. Whether you download REST HTTP API manually or use a launcher like foxygame.net for effortless installation, you’ll unlock a new level of control and creativity. Start building your server’s digital ecosystem today.