ONYX ONYX

Standard HTTP Error Codes

CodeMeaning
400Invalid JSON body or malformed request
401Missing or invalid Bearer token / X-API-Key
403Token revoked or insufficient scope
404Endpoint, release, or published profile not found
422Validation failure (e.g., invalid SemVer)
426Client version below minimum_client_version
429Rate limit exceeded (inspect Retry-After header)

Public Signing Key (ECDSA-P256-SHA256)

Embed this public key in your C++ desktop client to verify integrity.digital_signature against integrity.canonical_manifest.

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFmhba8BLjkTScC/zvSw7wyFPlsfT
6dwJY2Di6MmabuftFe45q5vTpL++yv6UxjpssjrlIkQKcvEE59eZduPMqQ==
-----END PUBLIC KEY-----
GET /api/v1/health
120 req/min

Verifies API service liveness and database connectivity.

Auth: None (Public) Parameters: None
Example cURL Request
curl -sS https://api.game.bdmove.site/api/v1/health
Example JSON Response
{
    "success": true,
    "status": "operational",
    "service": "AegisConfig",
    "api_version": "v1",
    "database": "connected",
    "timestamp": "2026-12-02T00:00:00Z"
}
POST /api/v1/client/register
20 req/min

Registers a C++ desktop client instance and issues a scoped Bearer access token + ECDSA signing public key.

Auth: Header: X-API-Key: <application_api_key> Parameters: JSON Body: client_name (string), client_version (SemVer, required), os_info (string)
Example cURL Request
curl -sS -X POST https://api.game.bdmove.site/api/v1/client/register \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_APP_API_KEY" \
  -d '{"client_name":"Workstation-01","client_version":"1.2.0","os_info":"Windows 11 x64"}'
Example JSON Response
{
    "success": true,
    "application": "DesktopApplication",
    "client_uuid": "550e8400-e29b-41d4-a716-446655440000",
    "access_token": "ct_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "token_type": "Bearer",
    "registered_at": "2026-12-02T00:00:00Z",
    "signing_algorithm": "ECDSA-P256-SHA256"
}
GET /api/v1/configuration
120 req/min

Fetches the latest published configuration profile along with its SHA-256 hash and ECDSA P-256 digital signature.

Auth: Header: Authorization: Bearer <client_token> Parameters: Query: profile (optional), environment (production|staging|development), client_version (optional SemVer)
Example cURL Request
curl -sS "https://api.game.bdmove.site/api/v1/configuration?environment=production" \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN"
Example JSON Response
{
    "success": true,
    "application": "DesktopApplication",
    "profile": "default",
    "environment": "production",
    "config_version": 12,
    "minimum_client_version": "1.0.0",
    "published_at": "2026-12-02T00:00:00Z",
    "configuration": {
        "theme": "dark",
        "notifications": true,
        "language": "en"
    },
    "integrity": {
        "payload_sha256": "e3b0c44298fc1c149afbf4c8996fb924...",
        "signature_algorithm": "ECDSA-P256-SHA256",
        "digital_signature": "MEUCIQ..."
    }
}
GET /api/v1/configuration/version
120 req/min

Lightweight polling endpoint returning only config_version and payload_sha256 for cache validation.

Auth: Header: Authorization: Bearer <client_token> Parameters: Query: profile (optional), environment (production|staging|development)
Example cURL Request
curl -sS "https://api.game.bdmove.site/api/v1/configuration/version?environment=production" \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN"
Example JSON Response
{
    "success": true,
    "application": "DesktopApplication",
    "profile": "default",
    "environment": "production",
    "config_version": 12,
    "minimum_client_version": "1.0.0",
    "payload_sha256": "e3b0c44298fc1c149afbf4c8996fb924...",
    "published_at": "2026-12-02T00:00:00Z"
}
GET /api/v1/app/version
120 req/min

Returns the latest published release version, minimum supported version, and package SHA-256 checksum.

Auth: Header: Authorization: Bearer <client_token> Parameters: Query: channel (stable|beta|development)
Example cURL Request
curl -sS "https://api.game.bdmove.site/api/v1/app/version?channel=stable" \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN"
Example JSON Response
{
    "success": true,
    "application": "DesktopApplication",
    "channel": "stable",
    "latest_version": "1.4.0",
    "minimum_supported_version": "1.0.0",
    "signature_verified": true
}
GET /api/v1/app/manifest
120 req/min

Returns combined release metadata, configuration summary, digital signatures, and public verification key.

Auth: Header: Authorization: Bearer <client_token> Parameters: Query: channel, environment, profile
Example cURL Request
curl -sS "https://api.game.bdmove.site/api/v1/app/manifest?channel=stable" \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN"
Example JSON Response
{
    "success": true,
    "application": "DesktopApplication",
    "signing_verification": {
        "algorithm": "ECDSA-P256-SHA256",
        "public_key_fingerprint_sha256": "..."
    }
}
POST /api/v1/client/heartbeat
120 req/min

Updates client liveness timestamp and returns the latest published config_version.

Auth: Header: Authorization: Bearer <client_token> Parameters: JSON Body (optional): client_version, os_info
Example cURL Request
curl -sS -X POST https://api.game.bdmove.site/api/v1/client/heartbeat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN" \
  -d '{"client_version":"1.2.0"}'
Example JSON Response
{
    "success": true,
    "client_uuid": "550e8400-e29b-41d4-a716-446655440000",
    "acknowledged_at": "2026-12-02T00:00:00Z",
    "latest_config_version": 12,
    "server_status": "operational"
}
POST /api/v1/license/verify
60 req/min

Verifies license validity, tracks device activation within max_activations, and returns authorized profiles in serial order.

Auth: JSON Body: license_key or Header: X-License-Key Parameters: JSON Body: license_key, client_identifier, client_name, app_version, os_info
Example cURL Request
curl -sS -X POST https://api.game.bdmove.site/api/v1/license/verify \
  -H "Content-Type: application/json" \
  -d '{"license_key":"ONYX-XXXXX-XXXXX","client_identifier":"ws-01","app_version":"1.0.0"}'
Example JSON Response
{
    "success": true,
    "license_id": "lic_xxxxxxxxxxxx",
    "status": "active",
    "authorized_profiles": [
        {
            "order": 1,
            "profile_id": "prf_xxxxxxxxxxxx",
            "version": 4
        }
    ]
}
GET /api/v1/profiles/bundle
120 req/min

Retrieves all authorized published profiles assigned to a license in their configured serial order.

Auth: Header: X-License-Key (optional X-Client-ID) Parameters: Headers: X-License-Key, X-Client-ID
Example cURL Request
curl -sS https://api.game.bdmove.site/api/v1/profiles/bundle \
  -H "X-License-Key: ONYX-XXXXX-XXXXX" -H "X-Client-ID: ws-01"
Example JSON Response
{
    "success": true,
    "license_id": "lic_xxxxxxxxxxxx",
    "count": 2,
    "profiles": [
        {
            "order": 1,
            "profile_id": "prf_a",
            "version": 4,
            "status": "published",
            "checksum": "...",
            "configuration": []
        }
    ]
}
GET /api/v1/profiles/{profile_id}
120 req/min

Retrieves the active published configuration for an independent AI profile with ETag/If-None-Match (304) caching, SHA-256 checksum, and ECDSA signature.

Auth: Header: X-Profile-Key: <profile_key> or Bearer Parameters: Path: profile_id (e.g. prf_xxxxxxxxxxxx)
Example cURL Request
curl -sS https://api.game.bdmove.site/api/v1/profiles/prf_xxxxxxxxxxxx \
  -H "X-Profile-Key: YOUR_PROFILE_KEY"
Example JSON Response
{
    "success": true,
    "profile_id": "prf_xxxxxxxxxxxx",
    "version_number": 4,
    "configuration": {
        "theme": "dark"
    },
    "integrity": {
        "content_sha256": "...",
        "signature_algorithm": "ECDSA-P256-SHA256"
    }
}
GET /api/v1/profiles/{profile_id}/version | /history | /metadata
120 req/min

Lightweight version check (/version), immutable version history (/history), and profile metadata (/metadata) for any independent profile.

Auth: Header: X-Profile-Key: <profile_key> or Bearer Parameters: Path: profile_id
Example cURL Request
curl -sS https://api.game.bdmove.site/api/v1/profiles/prf_xxxxxxxxxxxx/version \
  -H "X-Profile-Key: YOUR_PROFILE_KEY"
Example JSON Response
{
    "success": true,
    "profile_id": "prf_xxxxxxxxxxxx",
    "version_number": 4,
    "content_sha256": "..."
}
GET /api/v1/providers/status
120 req/min

Returns live health status, latency, success rate, and last sync timestamp of external API providers (never exposes credentials).

Auth: Admin Session or Bearer Token Parameters: None
Example cURL Request
curl -sS https://api.game.bdmove.site/api/v1/providers/status \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN"
Example JSON Response
{
    "success": true,
    "count": 1,
    "providers": [
        {
            "name": "GitHub Status",
            "status": "online",
            "last_latency_ms": 112,
            "success_rate": 100
        }
    ]
}
GET /api/v1/events
120 req/min

Polling fallback endpoint returning real-time structured platform events after cursor after_id.

Auth: Admin Session or Bearer Token Parameters: Query: after_id, category, severity, application_id, provider_id, q, limit
Example cURL Request
curl -sS "https://api.game.bdmove.site/api/v1/events?after_id=0&limit=20" \
  -H "Authorization: Bearer YOUR_CLIENT_TOKEN"
Example JSON Response
{
    "success": true,
    "last_id": 42,
    "events": [
        {
            "id": 42,
            "event_type": "configuration.published",
            "category": "CONFIGURATION",
            "message": "Configuration published"
        }
    ]
}
GET /api/v1/events/stream
Streaming SSE

Server-Sent Events (text/event-stream) real-time stream powering the ONYX Live Console with Last-Event-ID replay.

Auth: Admin Session or Bearer Token Parameters: Header: Last-Event-ID (optional) | Query: after_id, category, severity
Example cURL Request
curl -N -H "Authorization: Bearer YOUR_CLIENT_TOKEN" "https://api.game.bdmove.site/api/v1/events/stream"
Example JSON Response
id: 42
event: live_event
data: {"id":42,"category":"CONFIGURATION","message":"Configuration published"}
GET /api/v1/documentation
120 req/min

Returns a machine-readable JSON catalog of all REST API v1 endpoints and authentication policies.

Auth: None (Public) Parameters: None
Example cURL Request
curl -sS https://api.game.bdmove.site/api/v1/documentation
Example JSON Response
{"success": true, "api_version": "v1", "endpoints": [...]}

Desktop Application Integration Guide

Recommended safe lifecycle for an authorized C++ / native desktop application consuming published ONYX settings:

  1. Endpoint Configuration: Point to https://api.game.bdmove.site/api/v1 over HTTPS with TLS certificate verification enabled.
  2. Secure Credential Storage: Store the user's license key or profile API key in OS secure storage (e.g., Windows DPAPI / Credential Manager) — never hardcode secrets in client binaries.
  3. Startup License Check: Call POST /api/v1/license/verify with a stable client_identifier to validate license status, expiration, activation count, and receive authorized profiles in serial order.
  4. Version Check & Conditional Fetch: Poll GET /api/v1/profiles/{profile_id}/version or pass If-None-Match: "<cached_checksum>" to GET /api/v1/profiles/{profile_id} (or /api/v1/profiles/bundle).
  5. JSON & Signature Validation: Parse JSON strictly, verify checksum (SHA-256) and integrity.digital_signature (ECDSA-P256-SHA256) using the public key above before applying settings.
  6. Safe Local Caching & Offline Fallback: Atomically cache verified JSON settings locally; on timeout, offline state, or HTTP 429/5xx, apply exponential backoff and continue using the last verified cached version.
  7. Display Active Version: Show profile_id, version, updated_at, and short checksum in your desktop app's About / Diagnostics panel.