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:

  1. Log in to your DeltaPlugins account
  2. Navigate to API Settings
  3. Click "Generate API Key"
  4. 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:

1
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:

123
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

GET /api/v1/plugins

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

123456789101112131415161718192021
{
  "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
  }
}
GET /api/v1/plugins/{plugin_id}

Retrieve detailed information about a specific plugin.

Path Parameters

Parameter Type Description
plugin_id string The unique identifier of the plugin

Response

123456789101112131415161718192021222324
{
  "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

GET /api/v1/user

Retrieve information about the authenticated user.

Response

123456789
{
  "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
}
GET /api/v1/user/plugins

Retrieve a list of plugins owned by the authenticated user.

Response

1234567891011
{
  "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

POST /api/v1/servers

Register a new server with DeltaPlugins.

Request Body

1234567
{
  "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

12345678910
{
  "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"
}
GET /api/v1/servers/{server_id}/stats

Retrieve statistics for a specific server.

Path Parameters

Parameter Type Description
server_id string The unique identifier of the server

Response

123456789101112131415161718192021
{
  "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:

1234567891011121314151617181920212223242526
// 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:

12345678910111213141516171819202122232425
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:

123456789101112131415161718
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.

v1.3.0
May 15, 2023
  • Added server statistics endpoint
  • Increased rate limits for premium accounts
  • Added plugin version history endpoint
v1.2.0
March 2, 2023
  • Added server registration endpoints
  • Improved error messages and documentation
  • Fixed bug in plugin search functionality
v1.1.0
January 10, 2023
  • Added user management endpoints
  • Implemented rate limiting
  • Added pagination to list endpoints
v1.0.0
November 5, 2022
  • 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.