Tenant-verifiable Ed25519-signed cockpit snapshot (OCF-06)
GET
/api/v1/cockpit/snapshot
const url = 'https://api.ultimateteam.ai/api/v1/cockpit/snapshot';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ultimateteam.ai/api/v1/cockpit/snapshot \ --header 'X-API-Key: <X-API-Key>'Build + sign the 7-panel cockpit snapshot bundle.
Returns the response via Response(content=bytes, media_type="application/json") — NOT a plain dict — because
FastAPI’s default JSON serialiser does not guarantee key
ordering. Byte-exact output is required so a consumer can
re-canonicalise the response (excluding the signature field)
and verify the signature against the embedded public key with
zero ambiguity.
Flow:
- :class:
CockpitSnapshotServicecollects per-panel state. - The signable subset (everything except
signature) is canonicalised withsort_keys=True, separators=(',', ':'). - :class:
SnapshotSignersigns the canonical bytes with the tenant’s CEO Ed25519 private key. - The final response bytes are re-canonicalised from the signable payload plus the signature so the returned JSON is deterministic (signature-verifiers replay step 2 client-side).
Raises: HTTPException 422: No active CEO certificate for the tenant.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
Examplegenerated
example