-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.json
More file actions
1 lines (1 loc) · 14.5 KB
/
swagger.json
File metadata and controls
1 lines (1 loc) · 14.5 KB
1
{"openapi":"3.1.0","info":{"title":"bitloops","description":"","license":{"name":""},"version":"0.0.12"},"paths":{"/api":{"get":{"tags":["super::handlers::meta"],"operationId":"handle_api_root","responses":{"200":{"description":"Dashboard API root","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRootResponse"}}}}}}},"/api/agents":{"get":{"tags":["super::handlers::dashboard"],"operationId":"handle_api_agents","parameters":[{"name":"branch","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"from","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"to","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"user","in":"path","required":true,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Agents in filtered checkpoint commits","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiAgentDto"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/branches":{"get":{"tags":["super::handlers::dashboard"],"operationId":"handle_api_branches","parameters":[{"name":"from","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"to","in":"path","required":true,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Branches with at least one checkpoint commit","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiBranchSummaryDto"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/check_bundle_version":{"get":{"tags":["super::handlers::bundle"],"operationId":"handle_api_check_bundle_version","responses":{"200":{"description":"Dashboard bundle install/update availability","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCheckBundleVersionResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"502":{"description":"Manifest fetch failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/checkpoints/{repo_id}/{checkpoint_id}":{"get":{"tags":["super::handlers::checkpoint"],"operationId":"handle_api_checkpoint","parameters":[{"name":"repo_id","in":"path","description":"Repository id","required":true,"schema":{"type":"string"}},{"name":"checkpoint_id","in":"path","description":"Checkpoint id (12 hex characters)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Checkpoint details with session transcript payloads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCheckpointDetailResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/commits":{"get":{"tags":["super::handlers::dashboard"],"operationId":"handle_api_commits","parameters":[{"name":"branch","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"from","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"to","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"user","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"agent","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"limit","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"offset","in":"path","required":true,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Filtered commit + checkpoint rows","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiCommitRowDto"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/db/health":{"get":{"tags":["super::handlers::health"],"operationId":"handle_api_db_health","responses":{"200":{"description":"Live database backend health","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiDbHealthResponse"}}}}}}},"/api/fetch_bundle":{"post":{"tags":["super::handlers::bundle"],"operationId":"handle_api_fetch_bundle","requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"Bundle fetched and installed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFetchBundleResponse"}}}},"409":{"description":"No compatible version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"422":{"description":"Checksum mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Install failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"502":{"description":"Download/manifest fetch failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/kpis":{"get":{"tags":["super::handlers::dashboard"],"operationId":"handle_api_kpis","parameters":[{"name":"branch","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"from","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"to","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"user","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"agent","in":"path","required":true,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Aggregated KPI metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKpisResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/openapi.json":{"get":{"tags":["super::handlers::meta"],"operationId":"handle_api_openapi","responses":{"200":{"description":"Generated OpenAPI document"}}}},"/api/repositories":{"get":{"tags":["super::handlers::dashboard"],"operationId":"handle_api_repositories","responses":{"200":{"description":"Known repositories for the dashboard","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiRepositoryDto"}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}},"/api/users":{"get":{"tags":["super::handlers::dashboard"],"operationId":"handle_api_users","parameters":[{"name":"branch","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"from","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"to","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"agent","in":"path","required":true,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Users in filtered checkpoint commits","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiUserDto"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}}}}}}},"components":{"schemas":{"ApiAgentDto":{"type":"object","required":["key"],"properties":{"key":{"type":"string"}}},"ApiBackendHealthDto":{"type":"object","required":["status","detail"],"properties":{"detail":{"type":"string"},"status":{"type":"string"}}},"ApiBranchSummaryDto":{"type":"object","required":["branch","checkpoint_commits"],"properties":{"branch":{"type":"string"},"checkpoint_commits":{"type":"integer","minimum":0}}},"ApiCheckBundleVersionResponse":{"type":"object","required":["installAvailable","reason"],"properties":{"currentVersion":{"type":["string","null"]},"installAvailable":{"type":"boolean"},"latestApplicableVersion":{"type":["string","null"]},"reason":{"type":"string"}}},"ApiCheckpointDetailResponse":{"type":"object","required":["checkpoint_id","strategy","branch","checkpoints_count","files_touched","session_count","sessions"],"properties":{"branch":{"type":"string"},"checkpoint_id":{"type":"string"},"checkpoints_count":{"type":"integer","format":"int32","minimum":0},"files_touched":{"type":"array","items":{"$ref":"#/components/schemas/ApiCommitFileDiffDto"}},"session_count":{"type":"integer","minimum":0},"sessions":{"type":"array","items":{"$ref":"#/components/schemas/ApiCheckpointSessionDetailDto"}},"strategy":{"type":"string"},"token_usage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ApiTokenUsageDto"}]}}},"ApiCheckpointDto":{"type":"object","required":["checkpoint_id","strategy","branch","checkpoints_count","files_touched","session_count","session_id","agents","first_prompt_preview","created_at","is_task","tool_use_id"],"properties":{"agents":{"type":"array","items":{"type":"string"}},"branch":{"type":"string"},"checkpoint_id":{"type":"string"},"checkpoints_count":{"type":"integer","format":"int32","minimum":0},"created_at":{"type":"string"},"files_touched":{"type":"array","items":{"$ref":"#/components/schemas/ApiCommitFileDiffDto"}},"first_prompt_preview":{"type":"string"},"is_task":{"type":"boolean"},"session_count":{"type":"integer","minimum":0},"session_id":{"type":"string"},"strategy":{"type":"string"},"token_usage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ApiTokenUsageDto"}]},"tool_use_id":{"type":"string"}}},"ApiCheckpointSessionDetailDto":{"type":"object","required":["session_index","session_id","agent","created_at","is_task","tool_use_id","metadata_json","transcript_jsonl","prompts_text","context_text"],"properties":{"agent":{"type":"string"},"context_text":{"type":"string"},"created_at":{"type":"string"},"is_task":{"type":"boolean"},"metadata_json":{"type":"string"},"prompts_text":{"type":"string"},"session_id":{"type":"string"},"session_index":{"type":"integer","minimum":0},"tool_use_id":{"type":"string"},"transcript_jsonl":{"type":"string"}}},"ApiCommitDto":{"type":"object","required":["sha","parents","author_name","author_email","timestamp","message","files_touched"],"properties":{"author_email":{"type":"string"},"author_name":{"type":"string"},"files_touched":{"type":"array","items":{"$ref":"#/components/schemas/ApiCommitFileDiffDto"}},"message":{"type":"string"},"parents":{"type":"array","items":{"type":"string"}},"sha":{"type":"string"},"timestamp":{"type":"integer","format":"int64"}}},"ApiCommitFileDiffDto":{"type":"object","required":["filepath","additionsCount","deletionsCount"],"properties":{"additionsCount":{"type":"integer","format":"int64","minimum":0},"deletionsCount":{"type":"integer","format":"int64","minimum":0},"filepath":{"type":"string"}}},"ApiCommitRowDto":{"type":"object","required":["commit","checkpoint"],"properties":{"checkpoint":{"$ref":"#/components/schemas/ApiCheckpointDto"},"commit":{"$ref":"#/components/schemas/ApiCommitDto"}}},"ApiDbHealthResponse":{"type":"object","required":["relational","events","postgres","clickhouse"],"properties":{"clickhouse":{"$ref":"#/components/schemas/ApiBackendHealthDto"},"events":{"$ref":"#/components/schemas/ApiBackendHealthDto"},"postgres":{"$ref":"#/components/schemas/ApiBackendHealthDto"},"relational":{"$ref":"#/components/schemas/ApiBackendHealthDto"}}},"ApiErrorBody":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"ApiErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ApiErrorBody"}}},"ApiFetchBundleResponse":{"type":"object","required":["installedVersion","bundleDir","status","checksumVerified"],"properties":{"bundleDir":{"type":"string"},"checksumVerified":{"type":"boolean"},"installedVersion":{"type":"string"},"status":{"type":"string"}}},"ApiKpisResponse":{"type":"object","required":["total_commits","total_checkpoints","total_agents","total_sessions","files_touched_count","input_tokens","output_tokens","cache_creation_tokens","cache_read_tokens","api_call_count","average_tokens_per_checkpoint","average_sessions_per_checkpoint"],"properties":{"api_call_count":{"type":"integer","format":"int64","minimum":0},"average_sessions_per_checkpoint":{"type":"number","format":"double"},"average_tokens_per_checkpoint":{"type":"number","format":"double"},"cache_creation_tokens":{"type":"integer","format":"int64","minimum":0},"cache_read_tokens":{"type":"integer","format":"int64","minimum":0},"files_touched_count":{"type":"integer","minimum":0},"input_tokens":{"type":"integer","format":"int64","minimum":0},"output_tokens":{"type":"integer","format":"int64","minimum":0},"total_agents":{"type":"integer","minimum":0},"total_checkpoints":{"type":"integer","minimum":0},"total_commits":{"type":"integer","minimum":0},"total_sessions":{"type":"integer","minimum":0}}},"ApiRepositoryDto":{"type":"object","required":["repoId","identity","name","provider","organization"],"properties":{"defaultBranch":{"type":["string","null"]},"identity":{"type":"string"},"name":{"type":"string"},"organization":{"type":"string"},"provider":{"type":"string"},"repoId":{"type":"string"}}},"ApiRootResponse":{"type":"object","required":["name","openapi"],"properties":{"name":{"type":"string"},"openapi":{"type":"string"}}},"ApiTokenUsageDto":{"type":"object","required":["input_tokens","output_tokens","cache_creation_tokens","cache_read_tokens","api_call_count"],"properties":{"api_call_count":{"type":"integer","format":"int64","minimum":0},"cache_creation_tokens":{"type":"integer","format":"int64","minimum":0},"cache_read_tokens":{"type":"integer","format":"int64","minimum":0},"input_tokens":{"type":"integer","format":"int64","minimum":0},"output_tokens":{"type":"integer","format":"int64","minimum":0}}},"ApiUserDto":{"type":"object","required":["key","name","email"],"properties":{"email":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"}}}}}}