{
    "name": "SVM store API",
    "api_version": 1,
    "docs": "https://svm.techdyn.co.uk/#api",
    "conventions": {
        "urls": "extensionless (/api/updates); the same endpoints also answer with .php (/api/updates.php)",
        "methods": "GET and HEAD; OPTIONS answers CORS preflight; anything else is 405",
        "cors": "Access-Control-Allow-Origin: *",
        "caching": "Cache-Control: no-cache with an ETag; send If-None-Match for a 304",
        "errors": "{\"error\": \"<code>\", \"message\": \"<text>\"} with a 4xx status",
        "pretty": "add ?pretty=1 for indented JSON"
    },
    "endpoints": [
        {
            "path": "/api/",
            "description": "This document"
        },
        {
            "path": "/api/health",
            "description": "Store liveness, build id and channel heads that have expired or expire within 7 days"
        },
        {
            "path": "/api/updates",
            "description": "Every updater project: base_url, status, latest version, channels, releases"
        },
        {
            "path": "/api/updates?project={project}",
            "description": "One updater project, with its keyring and the updater's own channels"
        },
        {
            "path": "/api/updates?project={project}&channel={channel}",
            "description": "One channel head with its artifacts"
        },
        {
            "path": "/api/updates?project={project}&release={version}",
            "description": "One release with its artifacts and their file manifests"
        },
        {
            "path": "/api/registry",
            "description": "Version registry projects (svm push / publish)"
        },
        {
            "path": "/api/manifest?project={project}",
            "description": "Registry manifest, filtered to versions signed by approved keys"
        },
        {
            "path": "/api/latest?project={project}",
            "description": "Latest verified registry version per channel"
        },
        {
            "path": "/api/version?project={project}&version={version}",
            "description": "One signed registry version record"
        },
        {
            "path": "/api/keys?project={project}",
            "description": "A registry project's public keys and their status"
        }
    ],
    "repository": {
        "base_url": "https://svm.techdyn.co.uk/updates/{project}",
        "files": {
            "keyring.json": "signed delegated keys (no-cache)",
            "roots.json": "optional root rotations; 404 when absent (no-cache)",
            "channels/{channel}.json": "signed channel head (no-cache)",
            "releases/{version}/release.json": "signed release (immutable)",
            "releases/{version}/{os}-{arch}.files.json": "platform file manifest (immutable)",
            "artifacts/{version}/{os}-{arch}.{zip|tar.zst}": "release archive (immutable)",
            "updater/...": "the same layout, for the updater's own updates"
        }
    }
}