Logging API

Shulker Supervisor Logger API v1.0

Programmatically log and retrieve time-stamped coordinate data for designated supervisors. Perfect for tracking in-game entities, monitoring device locations, or building custom location-based services.

Updated recently 15 min read API v1.0

Introduction

Log Data
Send coordinate data with automatic timestamping for any supervisor.
Retrieve History
Get complete log history (up to 2000 entries) for any supervisor.
Auto-Purge
Oldest entries automatically deleted when 2000 limit is reached.

📡 Simple RESTful API — Whether you're tracking in-game entities, monitoring device locations, or building a custom location-based service, this API provides a simple yet robust solution for your data logging needs.

Authentication

The API uses simple token-based authentication. Every request must include your unique supervisor_name and token as URL query parameters.

URL Format
?supervisor_name=alpha_one&token=supersecret123

🔐 Security Note — These credentials identify and authorize the supervisor. Without valid credentials, the API returns a 401 Unauthorized error.

Base URL

Base URL
https://shulker.in/api/shulker_supervisor_logger-v1.0/

Log Data

POST

Log a new data entry (coordinates and timestamp) for a specific supervisor.

Endpoint
/?action=send_data
ParameterTypeDescriptionRequired
supervisor_nameStringThe unique name of the supervisorRequired
tokenStringThe authentication tokenRequired
supervisor_xStringThe X coordinate or primary data valueRequired
supervisor_yStringThe Y coordinate or secondary data valueRequired

⚠️ Constraints — Combined length of supervisor_x and supervisor_y must not exceed 40 characters. System stores max 2000 entries per supervisor — oldest automatically deleted.

cURL Example
curl --location --request POST \
'https://shulker.in/api/shulker_supervisor_logger-v1.0/?supervisor_name=alpha_one&token=supersecret123&action=send_data' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'supervisor_x=123.456' \
--data-urlencode 'supervisor_y=-78.910'
JavaScript Example
async function logSupervisorData(name, token, x, y) {
    const API_URL = 'https://shulker.in/api/shulker_supervisor_logger-v1.0/';
    const params = new URLSearchParams({
        supervisor_name: name, token: token, action: 'send_data'
    });
    const body = new URLSearchParams();
    body.append('supervisor_x', x);
    body.append('supervisor_y', y);
    
    const response = await fetch(`${API_URL}?${params}`, {
        method: 'POST',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        body: body
    });
    
    return await response.json();
}
Python Example
import requests

def log_supervisor_data(name, token, x, y):
    url = 'https://shulker.in/api/shulker_supervisor_logger-v1.0/'
    params = {'supervisor_name': name, 'token': token, 'action': 'send_data'}
    data = {'supervisor_x': x, 'supervisor_y': y}
    
    response = requests.post(url, params=params, data=data)
    return response.json()
Success Response
{
    "success": true,
    "message": "Data logged successfully"
}

Retrieve Data

GET

Retrieve the complete log history (up to 2000 entries) for a specific supervisor.

Endpoint
/?action=get_data
cURL Example
curl --location \
'https://shulker.in/api/shulker_supervisor_logger-v1.0/?supervisor_name=alpha_one&token=supersecret123&action=get_data'
JavaScript Example
async function getSupervisorLogs(name, token) {
    const API_URL = 'https://shulker.in/api/shulker_supervisor_logger-v1.0/';
    const params = new URLSearchParams({
        supervisor_name: name, token: token, action: 'get_data'
    });
    
    const response = await fetch(`${API_URL}?${params}`);
    const data = await response.json();
    
    if (!response.ok) throw new Error(data.error);
    return data.logs;
}
Python Example
import requests

def get_supervisor_logs(name, token):
    url = 'https://shulker.in/api/shulker_supervisor_logger-v1.0/'
    params = {'supervisor_name': name, 'token': token, 'action': 'get_data'}
    
    response = requests.get(url, params=params)
    response.raise_for_status()
    return response.json()['logs']
Success Response
{
    "logs": [
        {
            "x": "123.456",
            "y": "-78.910",
            "timestamp": "2025-09-30 05:00:54"
        },
        {
            "x": "123.500",
            "y": "-78.950",
            "timestamp": "2025-09-30 05:01:15"
        }
    ]
}

Error Handling

Status CodeMeaningExample Response
400Missing/invalid parameters{"error": "Missing supervisor_name or token"}
401Authentication failed{"error": "Authentication failed"}
405Incorrect HTTP method{"error": "POST required for send_data"}
500Server-side problem{"error": "Database connection failed"}

Log Entry Data Structure

KeyTypeDescription
xStringThe X coordinate or primary data value that was logged
yStringThe Y coordinate or secondary data value that was logged
timestampStringServer timestamp in YYYY-MM-DD HH:MM:SS format (UTC)
Example Log Object
{
    "x": "123.456",
    "y": "-78.910",
    "timestamp": "2025-09-30 05:00:54"
}