RainDrippy API Documentation

Version 1.0

Quick Navigation

Getting Started

Welcome to the RainDrippy API documentation. This guide will help you understand how to interact with our growing Public API to access and use our services in your own applications.

API Structure: Our API is split into Public (documented, accessible) and Private (internal use only) components.

API Components

  1. Public API: Documented and publicly accessible. Handles reading & writing data to/from certain services that we make publicly available.
  2. Private API: Internal use only, undocumented, and may change without notice. Handles vital functions such as database queries and authentication.

Getting Your API Key

To get started with the Public API, you'll need an API key:

  1. Create an account
  2. Generate an API key from your profile page
  3. Include the key in all your requests
Important: Requests without an API key will return HTTP 401 Unauthorized.

Making API Calls

All requests to the RainDrippy Public API use the following base URL:


                

Authentication

Include your raw API key in the X-API-KEY header for all requests:


                

Response Format

All API responses are in JSON format with appropriate HTTP status codes.

Available Endpoints

Player Count

Endpoint:
/playercount
Method:
GET
Description:
Returns the current number of active players on the Minecraft server

Example Response:

{
    "playerCount": 10
}

Hash Generator

Endpoint:
/hash
Method:
POST
Description:
Hashes a string using SHA-256 + salt (same method used for password storage)

Request Body:

{
    "password": "string_to_hash"
}

Example Response:

{
    "output": "hashed_string_here"
}

File Management

Endpoint:
/files
Methods:
GET POST
Description:
List files (GET) or upload a file (POST) to the server

GET Response:

{
    "files": [
        "1fb4a8dde895b53d8fc62660d3cbe22f"
    ]
}

POST Request (multipart/form-data):

Key: 'file' (File)
Content-Type: multipart/form-data

POST Response:

{
    "message": "File uploaded successfully",
    "file": {
        "fieldname": "file",
        "originalname": "main.png",
        "encoding": "7bit",
        "mimetype": "image/png",
        "destination": "C:/server/media",
        "filename": "1fb4a8dde895b53d8fc62660d3cbe22f",
        "path": "C:/server/media/1fb4a8dde895b53d8fc62660d3cbe22f",
        "size": 4581
    }
}

Server Status

Endpoint:
/serverrunning
Method:
GET
Description:
Check if the Minecraft server is currently running

Example Response:

{
    "running": true
}

Start Server

Endpoint:
/startserver
Method:
POST
Description:
Start the Minecraft server (requires authentication)
Authentication:
Requires userToken cookie from login endpoint

Example Response:

{
    "message": "Server started successfully"
}

Rate Limits & Policies

Current Rate Limit: 100 requests per hour per API key

To ensure fair usage and prevent abuse, the RainDrippy Public API enforces rate limits on requests. If you exceed the limit, access will be temporarily restricted until your limit resets.

Best Practices

  • Implement appropriate error handling for rate limiting responses
  • Cache responses when possible to reduce API calls
  • Monitor your usage from your profile page

Policy Updates

We reserve the right to modify these limits and policies at any time. Continued abuse of the API may result in the suspension or revocation of your API key.

For questions or concerns regarding the API, please contact our support team.