API Documentation
RESTful API for accessing RegalRealm Tools programmatically
Authentication
All API endpoints require authentication using an API key. Include your API key in the request header:
X-API-Key: your-api-key-here
To obtain an API key, please contact support.
Rate Limiting
API requests are rate-limited to 100 requests per hour per API key. If you exceed this limit, you'll receive a 429 status code with a Retry-After header.
Endpoints
POST /api/v1/json/format
Format JSON data with proper indentation.
Request Body:
{
"json": "{\"key\":\"value\"}"
}
Response:
{
"success": true,
"result": "{\n \"key\": \"value\"\n}"
}
POST /api/v1/uuid/generate
Generate UUID identifiers.
Request Body:
{
"version": 4,
"count": 1,
"uppercase": false,
"no_dashes": false
}
POST /api/v1/jwt/decode
Decode JWT tokens (without verification).
Request Body:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
POST /api/v1/regex/test
Test regular expressions against text.
Request Body:
{
"pattern": "\\d+",
"text": "Hello 123 World",
"flags": ["IGNORECASE"]
}
POST /api/v1/cron/parse
Parse cron expressions and get next/previous run times.
Request Body:
{
"expression": "0 0 * * *"
}
POST /api/v1/yaml/convert
Convert between YAML and JSON formats.
Request Body:
{
"data": "key: value",
"to_format": "json"
}
POST /api/v1/diff/calculate
Calculate differences between two texts or JSON objects.
Request Body:
{
"text1": "Hello World",
"text2": "Hello Universe"
}
Error Responses
All errors follow this format:
{
"error": "endpoint-name: Error message"
}
Common HTTP status codes:
- 400: Bad Request - Invalid input
- 401: Unauthorized - Missing or invalid API key
- 429: Too Many Requests - Rate limit exceeded
- 500: Internal Server Error