{"openapi":"3.1.0","info":{"title":"TubeResults API","description":"Uploads publish immutable reports. Public report and tube history reads require no authentication.","version":"1.0.0"},"paths":{"/healthz":{"get":{"tags":["Operations"],"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/tests":{"post":{"tags":["Reports"],"summary":"Publish a test run: signed frames from a registered tester, or a record with an upload key","operationId":"upload_api_v1_tests_post","requestBody":{"content":{"application/x-ndjson":{"schema":{"type":"string","description":"A VT-1 Lite run signed by its tester: every {\"t\":\"rec\"} frame exactly as the tester sent it, one per line. No credentials. See /integrate."}},"application/json":{"schema":{"type":"object","description":"Native vt1-lite schema 1 or vt1-claude record_version 1 record, with a bearer upload key. Shown as not signed. See /integrate."}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"200":{"description":"Identical run was already stored"},"403":{"description":"Unregistered or revoked signing key, or a tester that signs uploaded without its signature"},"409":{"description":"Conflicting test ID or source run"},"429":{"description":"Too many signed uploads from one tester"},"413":{"description":"Upload exceeds 5 MiB"},"422":{"description":"Invalid record"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/tests/{test_id}":{"get":{"tags":["Reports"],"summary":"Read a normalized public report","operationId":"read_report_api_v1_tests__test_id__get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tests/{test_id}/source":{"get":{"tags":["Reports"],"summary":"Download the exact original upload: the record JSON, or a signed run's frames (NDJSON)","operationId":"source_api_v1_tests__test_id__source_get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tests/{test_id}/samples/{index}.csv":{"get":{"tags":["Reports"],"summary":"Download one procedure's original sample table","operationId":"sample_csv_api_v1_tests__test_id__samples__index__csv_get","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"string","title":"Test Id"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tubes/{serial}":{"get":{"tags":["Tubes"],"summary":"Read tube history, latest uploads first","operationId":"read_tube_api_v1_tubes__serial__get","parameters":[{"name":"serial","in":"path","required":true,"schema":{"type":"string","title":"Serial"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}