API Reference
Documentation for developers integrating with DeltaPlugins
Introduction to the DeltaPlugins API
The DeltaPlugins API allows developers to integrate with our platform and extend the functionality of our plugins. This documentation provides comprehensive information about our API endpoints, authentication methods, and usage examples.
Plugin Integration
Connect your plugins with the DeltaPlugins ecosystem
Cloud Services
Access cloud-based features and storage
User Management
Manage users, permissions, and authentication
Authentication
All API requests require authentication. We use API keys to authenticate requests.
Obtaining an API Key
To get an API key, follow these steps:
- Log in to your DeltaPlugins account
- Navigate to API Settings
- Click "Generate API Key"
- Store your API key securely - it will only be shown once
Security Warning
Never share your API key or commit it to public repositories. If your key is compromised, regenerate it immediately from your account settings.
Using Your API Key
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
Rate Limiting
API requests are subject to rate limiting to ensure fair usage:
- Free accounts: 100 requests per hour
- Premium accounts: 1,000 requests per hour
- Enterprise accounts: 10,000 requests per hour
Rate limit information is included in the response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1620000000
API Endpoints
The DeltaPlugins API provides the following endpoints for interacting with our services.
Plugin Management
Retrieve a list of all available plugins.
Query Parameters
Parameter | Type | Description |
---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Results per page (default: 20, max: 100) |
category | string | Filter by category |
Response
{
"data": [
{
"id": "plugin-123",
"name": "DeltaEconomy",
"description": "Advanced economy system for Minecraft servers",
"version": "2.1.0",
"category": "economy",
"author": "DeltaPlugins Team",
"downloads": 15243,
"rating": 4.8,
"price": 0,
"premium": false
}
],
"meta": {
"total": 156,
"page": 1,
"limit": 20
}
}
Retrieve detailed information about a specific plugin.
Path Parameters
Parameter | Type | Description |
---|---|---|
plugin_id | string | The unique identifier of the plugin |
Response
{
"id": "plugin-123",
"name": "DeltaEconomy",
"description": "Advanced economy system for Minecraft servers",
"long_description": "DeltaEconomy is a comprehensive economy plugin that provides...",
"version": "2.1.0",
"category": "economy",
"author": "DeltaPlugins Team",
"downloads": 15243,
"rating": 4.8,
"price": 0,
"premium": false,
"requirements": {
"minecraft_version": "1.16.5+",
"dependencies": ["DeltaCore"]
},
"features": [
"Multiple currency support",
"Bank accounts",
"Interest system",
"Shop integration"
],
"download_url": "https://api.deltaplugins.com/downloads/plugin-123/latest"
}
User Management
Retrieve information about the authenticated user.
Response
{
"id": "user-456",
"username": "serveradmin",
"email": "[email protected]",
"account_type": "premium",
"created_at": "2022-01-15T12:00:00Z",
"plugins_owned": 12,
"api_requests_remaining": 950
}
Retrieve a list of plugins owned by the authenticated user.
Response
{
"data": [
{
"id": "plugin-123",
"name": "DeltaEconomy",
"version": "2.1.0",
"purchased_at": "2022-03-10T15:30:00Z",
"license_key": "DELTA-ECO-1234-5678-90AB"
},
]
}
Server Integration
Register a new server with DeltaPlugins.
Request Body
{
"name": "My Minecraft Server",
"address": "play.example.com",
"port": 25565,
"version": "1.18.2",
"description": "A fun survival server with economy and land claims"
}
Response
{
"id": "server-789",
"name": "My Minecraft Server",
"address": "play.example.com",
"port": 25565,
"version": "1.18.2",
"description": "A fun survival server with economy and land claims",
"created_at": "2023-05-20T10:15:00Z",
"server_key": "SERVER-KEY-1234-5678-90AB"
}
Retrieve statistics for a specific server.
Path Parameters
Parameter | Type | Description |
---|---|---|
server_id | string | The unique identifier of the server |
Response
{
"online": true,
"players": {
"online": 42,
"max": 100
},
"uptime": 86400, // seconds
"tps": 19.8,
"memory": {
"used": 2048, // MB
"max": 4096 // MB
},
"plugins": [
{
"name": "DeltaEconomy",
"version": "2.1.0",
"status": "running"
},
// More plugins...
]
}
Code Examples
Here are some examples of how to use the DeltaPlugins API in different programming languages.
JavaScript Example
Using fetch to get a list of plugins:
// Fetch plugins from the API
const fetchPlugins = async () => {
const apiKey = 'YOUR_API_KEY';
try {
const response = await fetch('https://api.deltaplugins.com/api/v1/plugins', {
method: 'GET',
headers: {
'Authorization': Bearer ${apiKey},
'Content-Type': 'application/json'
}
});
if (!response.ok) {
throw new Error(API error: ${response.status});
}
const data = await response.json();
console.log('Plugins:', data);
return data;
} catch (error) {
console.error('Failed to fetch plugins:', error);
}
};
fetchPlugins();
Java Example
Using OkHttp to get a list of plugins:
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;
public class DeltaPluginsApiClient {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient();
String apiKey = "YOUR_API_KEY";
Request request = new Request.Builder()
.url("https://api.deltaplugins.com/api/v1/plugins")
.header("Authorization", "Bearer " + apiKey)
.build();
try (Response response = client.newCall(request).execute()) {
if (!response.isSuccessful()) {
throw new IOException("Unexpected code " + response);
}
System.out.println(response.body().string());
} catch (IOException e) {
e.printStackTrace();
}
}
}
Python Example
Using requests to get a list of plugins:
import requests
def fetch_plugins():
api_key = "YOUR_API_KEY"
url = "https://api.deltaplugins.com/api/v1/plugins"
headers = {
"Authorization": f"Bearer {api_key}"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status() # Raises an HTTPError for bad responses (4xx or 5xx)
print(response.json())
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
fetch_plugins()
API Changelog
Stay up to date with changes to our API.
- Added server statistics endpoint
- Increased rate limits for premium accounts
- Added plugin version history endpoint
- Added server registration endpoints
- Improved error messages and documentation
- Fixed bug in plugin search functionality
- Added user management endpoints
- Implemented rate limiting
- Added pagination to list endpoints
- Initial API release
- Basic plugin management endpoints
- Authentication system
Need Help?
If you have questions about our API or need assistance with integration, we're here to help.