Build with QSOEngine REST API & SDK
Integrate multi-format amateur radio log validation, cross-checking, scoring, standings, awards, and live SSE streams into your event portal.
/docs (Administrator Console only).
Quick Start
Connect an event portal or custom integration to QSOEngine in three steps.
Use the Universal Base URL
Send REST requests to https://api.qsoengine.1bsh.com/v1 (also mounted at /api/v1).
Register Your Origin
Add your portal domain to allowed_origins in the event's rules.json so browser CORS requests succeed.
Validate, Submit & Stream
Dry-run logs via POST /v1/events/:eventId/validate-log, upload via /logs, and subscribe to live SSE updates.
Authentication, Roles & CORS
Public discovery, dry-run validation, and published standings are accessible without credentials. Organizer and adjudication actions require a Bearer token (Authorization: Bearer <token>) or session cookie issued by POST /v1/auth/login.
| Access Level | Scope & Behavior |
|---|---|
Public |
Health, status, event list, rules, stateless dry-run validation, log upload (within deadline), received logs, statistics, and published standings/winners. |
Optional Admin |
Respects publish_scores for anonymous callers; authenticated administrator or contest manager callers can inspect draft results with ?admin=1. |
Auth Required |
Saving rules/settings, viewing full QSO rows, running cross-check adjudication, and viewing admin metrics require role authorization. |
API & SDK Versioning Policy
| Surface | Status | Notes |
|---|---|---|
/v1/events/* & qsoengine-client.js |
Stable (v1.1.0) | Primary universal REST API and SDK for all new event portals and integrations. |
/api/v1/contests/* & robot-client.js |
Legacy Compatibility | Maintained for backward compatibility; responses include Deprecation: true header. Migrate to /v1/events/*. |
429, retry using exponential backoff (e.g., 2s, 4s, 8s) rather than tight polling loops.
Public REST API Reference
Filter by HTTP method or search endpoints by path and capability. Click Copy cURL on any endpoint to test it locally or download the OpenAPI 3.0.3 JSON specification.
Sample JSON Responses (Success & Error)
// 200 OK — POST /v1/events/bali_dx_2026/validate-log
{
"success": true,
"format": "CABRILLO",
"summary": {
"totalQsos": 2,
"validQsos": 2,
"invalidQsos": 0,
"dupeQsos": 0,
"estimatedScore": 4
}
}
// 400 Bad Request / 429 Too Many Requests
{
"success": false,
"message": "Unsupported log format or missing content payload"
}
JavaScript SDK & Integration Examples v1.1.0
Load https://qsoengine.1bsh.com/sdk/qsoengine-client.js (v1.1.0) in any organizer portal or call the REST API directly from cURL, Node.js, PHP, or Python.
<script src="https://qsoengine.1bsh.com/sdk/qsoengine-client.js"></script>
<script>
(async () => {
const qse = new QSOEngineClient('https://api.qsoengine.1bsh.com', 'bali_dx_2026', {
apiPrefix: '/v1'
});
const sampleLog = [
'START-OF-LOG: 3.0',
'CALLSIGN: YB9ABC',
'QSO: 14250 PH 2026-11-21 0412 YB9ABC 59 001 JA1XYZ 59 002',
'END-OF-LOG:'
].join('\n');
// 1. Dry-run multi-format validation (Cabrillo / ADIF / CSV / JSON)
const preview = await qse.validateLog(sampleLog, 'CABRILLO');
console.log('Preview:', preview.summary);
// 2. Fetch published results & awards
const results = await qse.getResults();
const awards = await qse.getAwards();
console.log({ results, awards });
// 3. Subscribe to live SSE updates
qse.connectStream({
log_uploaded: (data) => console.log('New log:', data.callsign),
scores_updated: () => console.log('Standings updated')
});
})();
</script>
# Dry-run log validation (returns summary & per-QSO check)
curl -X POST "https://api.qsoengine.1bsh.com/v1/events/bali_dx_2026/validate-log" \
-H "Content-Type: application/json" \
-d '{"format":"CABRILLO","content":"START-OF-LOG: 3.0\nCALLSIGN: YB9ABC\nQSO: 14250 PH 2026-11-21 0412 YB9ABC 59 001 JA1XYZ 59 002\nEND-OF-LOG:"}'
# Fetch published event standings
curl -s "https://api.qsoengine.1bsh.com/v1/events/bali_dx_2026/scores"
(async () => {
const res = await fetch('https://api.qsoengine.1bsh.com/v1/events/bali_dx_2026/validate-log', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
format: 'ADIF',
content: '<EOH><CALL:6>JA1XYZ<BAND:3>20M<MODE:3>SSB<QSO_DATE:8>20261121<TIME_ON:4>0412<RST_SENT:2>59<STX:3>001<RST_RCVD:2>59<SRX:3>002<EOR>'
})
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const payload = await res.json();
console.log(payload.summary);
})();
<?php
$ch = curl_init('https://api.qsoengine.1bsh.com/v1/events/bali_dx_2026/validate-log');
$payload = json_encode([
'format' => 'CABRILLO',
'content' => "START-OF-LOG: 3.0\nCALLSIGN: YB9ABC\nQSO: 14250 PH 2026-11-21 0412 YB9ABC 59 001 JA1XYZ 59 002\nEND-OF-LOG:"
]);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_TIMEOUT => 10
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response['summary'] ?? $response);
import json
import urllib.request
req = urllib.request.Request(
'https://api.qsoengine.1bsh.com/v1/events/bali_dx_2026/validate-log',
data=json.dumps({
'format': 'CABRILLO',
'content': 'START-OF-LOG: 3.0\nCALLSIGN: YB9ABC\nQSO: 14250 PH 2026-11-21 0412 YB9ABC 59 001 JA1XYZ 59 002\nEND-OF-LOG:'
}).encode('utf-8'),
headers={'Content-Type': 'application/json'},
method='POST'
)
with urllib.request.urlopen(req, timeout=10) as resp:
data = json.loads(resp.read().decode('utf-8'))
print(data.get('summary'))
Key SDK Methods
| Method | Purpose |
|---|---|
health() / getStatus() | Check engine capabilities, DB latency, and uptime telemetry. |
listEvents() / getRules(normalized) | Retrieve registered events and normalized Rules v2 metadata. |
validateLog(input, format?) | Stateless dry-run validation for Cabrillo, ADIF, CSV, or JSON. |
uploadLog(formData) | Submit a participant log to POST /v1/events/:eventId/logs. |
getScores() / getResults() / getAwards() | Fetch standings, combined results, and multi-tier award eligibility. |
getUbn(callsign) / connectStream(handlers) | Fetch per-callsign UBN details and listen to real-time SSE events. |
Rules v2 Configuration Guide
QSOEngine uses rules.json schema 2.0 to configure capability toggles, log formats, cross-checking strategy, scoring, multipliers, penalties, and award tiers per event.
{
"schemaVersion": "2.0",
"eventId": "nusantara_ses_2027",
"eventType": "SPECIAL_EVENT",
"acceptedFormats": ["CABRILLO", "ADIF", "CSV", "JSON"],
"processing": {
"validation": true,
"duplicateChecking": true,
"duplicateScope": "BAND_MODE",
"crossChecking": true,
"matchingStrategy": "REFERENCE_LOG",
"scoring": false,
"ranking": false,
"awardEligibility": true
},
"awards": {
"tiers": [
{ "id": "gold", "label": "Gold Award", "minValidQsos": 20 }
]
}
}
Error Reference
Errors return JSON in the shape {"success": false, "message": "..."} with standard HTTP status codes.
| HTTP Status | Meaning | Recommended Handling |
|---|---|---|
400 Bad Request | Missing log payload, unsupported format, or invalid input field. | Verify format, content/logfile, and required headers (callsign, email). |
401 Unauthorized | Missing or expired Bearer token / session cookie. | Authenticate via POST /v1/auth/login before calling protected routes. |
403 Forbidden | Insufficient role, unpublished scores, or submission deadline passed. | Check user role/scope, publish_scores, or event deadline_utc. |
404 Not Found | Unknown eventId, callsign, or log ID. | Confirm the event ID against GET /v1/events. |
413 Payload Too Large | Uploaded file exceeds the 15 MB log/template limit. | Split or trim unnecessary log lines before upload. |
429 Too Many Requests | Rate limiter triggered on public submission endpoints. | Retry with exponential backoff after the rate window resets. |
500 Internal Server Error | Unexpected backend or database error. | Check /status and retry safely. |
Changelog
- v1.1.0 (SDK v1.1.0 · OpenAPI 3.0.3): Added downloadable
/v1/openapi.json, runnable async IIFE SDK examples, PHP & Python REST samples, and documented rate-limit retry behavior. - v1.1.0 — QSOEngine Universal Platform: Initial public release featuring
/v1/events, multi-format parsing (Cabrillo, ADIF, CSV, JSON), Rules v2 presets,QSOEngineClientSDK, public developer documentation, interactive sandbox, and live system status telemetry.