Programmatically manage your servers
Our API allows you to programmatically manage your servers. All requests should be made to:
https://minecraftprotection.com/dashboard/api.php
All requests require your API Key, which can be generated in the Dashboard.
Include your API key in the request parameters as key.
Retrieve a list of all your protected servers.
GET https://minecraftprotection.com/dashboard/api.php?action=list_servers&key=YOUR_API_KEY
{
"status": "success",
"data": [
{
"sid": 1,
"hostname": "play.example.com",
"origins": [
{"ip": "1.2.3.4", "port": 25565}
]
}
]
}
Add a new server to your account.
POST https://minecraftprotection.com/dashboard/api.php
{
"action": "add_server",
"key": "YOUR_API_KEY",
"hostname": "play.example.com",
"origins": [
{ "ip": "1.2.3.4", "port": 25565 }
]
}
Update an existing server's configuration.
POST https://minecraftprotection.com/dashboard/api.php
{
"action": "edit_server",
"key": "YOUR_API_KEY",
"sid": 1,
"hostname": "new.example.com",
"origins": [
{ "ip": "5.6.7.8", "port": 25565 }
]
}
Remove a server from your account.
POST https://minecraftprotection.com/dashboard/api.php
{
"action": "delete_server",
"key": "YOUR_API_KEY",
"sid": 1
}