{"openapi":"3.1.0","info":{"title":"Hasm Cloud","version":"1.2.0"},"paths":{"/v1/systemone":{"post":{"summary":"V1 Systemone","operationId":"v1_systemone_v1_systemone_post","parameters":[{"name":"shadow","in":"query","required":false,"schema":{"type":"string","default":"0","title":"Shadow"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JevRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback":{"post":{"summary":"V1 Feedback","operationId":"v1_feedback_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/confirm":{"post":{"summary":"V1 Confirm","description":"Every answer of one decision is right — a positive verdict for calibration and training.","operationId":"v1_confirm_v1_confirm_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/accuracy":{"get":{"summary":"V1 Accuracy","description":"Measured accuracy and the thresholds currently in force, per question set and question.","operationId":"v1_accuracy_v1_accuracy_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/contracts":{"get":{"summary":"V1 Contracts","operationId":"v1_contracts_v1_contracts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/contracts/{cid}":{"put":{"summary":"V1 Put Contract","operationId":"v1_put_contract_v1_contracts__cid__put","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Spec"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"V1 Del Contract","operationId":"v1_del_contract_v1_contracts__cid__delete","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/templates":{"get":{"summary":"V1 Templates","operationId":"v1_templates_v1_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/contracts/from-template/{archetype}":{"post":{"summary":"V1 From Template","operationId":"v1_from_template_v1_contracts_from_template__archetype__post","parameters":[{"name":"archetype","in":"path","required":true,"schema":{"type":"string","title":"Archetype"}},{"name":"cid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/train/{cid}":{"post":{"summary":"V1 Train","operationId":"v1_train_v1_train__cid__post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"summary":"V1 Usage","operationId":"v1_usage_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/health":{"get":{"summary":"V1 Health","operationId":"v1_health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Home Page","operationId":"home_page__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/pricing":{"get":{"summary":"Pricing Page","operationId":"pricing_page_pricing_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/docs":{"get":{"summary":"Docs Page","operationId":"docs_page_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"summary":"Terms Page","operationId":"terms_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"summary":"Privacy Page","operationId":"privacy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/status":{"get":{"summary":"Status Page","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/waitlist":{"post":{"summary":"Waitlist","operationId":"waitlist_waitlist_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup":{"get":{"summary":"Signup Page","operationId":"signup_page_signup_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Signup Post","operationId":"signup_post_signup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Login Post","operationId":"login_post_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/logout":{"get":{"summary":"Logout","operationId":"logout_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"summary":"Dashboard","operationId":"dashboard_dashboard_get","parameters":[{"name":"welcome","in":"query","required":false,"schema":{"type":"string","default":"","title":"Welcome"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/keys/new":{"post":{"summary":"Keys New","operationId":"keys_new_keys_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/keys/revoke":{"post":{"summary":"Keys Revoke","operationId":"keys_revoke_keys_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/contracts/new":{"post":{"summary":"Contracts New","operationId":"contracts_new_contracts_new_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/contracts/template":{"post":{"summary":"Contracts Template","operationId":"contracts_template_contracts_template_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/contracts/policy":{"post":{"summary":"Contracts Policy","operationId":"contracts_policy_contracts_policy_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/contracts/delete":{"post":{"summary":"Contracts Delete","operationId":"contracts_delete_contracts_delete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/train/{cid}":{"post":{"summary":"Train Web","operationId":"train_web_train__cid__post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/confirm":{"post":{"summary":"Confirm Web","operationId":"confirm_web_confirm_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/target":{"post":{"summary":"Settings Target","operationId":"settings_target_settings_target_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/consent":{"post":{"summary":"Consent","operationId":"consent_consent_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/feedback":{"post":{"summary":"Feedback Web","operationId":"feedback_web_feedback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sw.js":{"get":{"summary":"Service Worker","operationId":"service_worker_sw_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/manifest.webmanifest":{"get":{"summary":"Manifest","operationId":"manifest_manifest_webmanifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/offline":{"get":{"summary":"Offline Page","operationId":"offline_page_offline_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/share":{"post":{"summary":"Share Target","description":"Android \"share to Hasm\": text, a link or files from any app land here, are read like a drop, and\nthe person continues on the tools page with everything already in place.","operationId":"share_target_share_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/share/{token}":{"get":{"summary":"Share Get","operationId":"share_get_share__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools":{"get":{"summary":"Tools Gallery","operationId":"tools_gallery_tools_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/tools/pick":{"post":{"summary":"Tools Pick","description":"Paste anything: Hasm picks the tool. One decision over the catalogue, like any other.","operationId":"tools_pick_tools_pick_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tools/publish":{"get":{"summary":"Tools Publish Page","operationId":"tools_publish_page_tools_publish_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Tools Publish","operationId":"tools_publish_tools_publish_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/tools/extract":{"post":{"summary":"Tools Extract","description":"A dropped file (raw bytes, name in X-Filename) -> items. Nothing is written to disk.","operationId":"tools_extract_tools_extract_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tools/feedback":{"post":{"summary":"Tools Feedback","description":"✓ confirms every answer of a result; ✗ records the right answer for the tool's main question.","operationId":"tools_feedback_tools_feedback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tools/{slug}":{"get":{"summary":"Tool Get","operationId":"tool_get_tools__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Tool Post","description":"Fallback for browsers without JavaScript: run up to 10 items and render the page.","operationId":"tool_post_tools__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/{slug}/run":{"post":{"summary":"Tool Run","description":"One item, for the progressive runner in the browser. Returns the rendered row.\nEverything after reading the body — session, quotas, database, model — runs off the event loop.","operationId":"tool_run_tools__slug__run_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/{slug}/save":{"post":{"summary":"Tool Save","operationId":"tool_save_tools__slug__save_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools":{"get":{"summary":"V1 Tools","operationId":"v1_tools_v1_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tools/{slug}":{"post":{"summary":"V1 Tool","operationId":"v1_tool_v1_tools__slug__post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tools":{"get":{"summary":"Admin Tools","operationId":"admin_tools_admin_tools_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Admin Tools Post","operationId":"admin_tools_post_admin_tools_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/playground":{"get":{"summary":"Playground Page","operationId":"playground_page_playground_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Playground Post","operationId":"playground_post_playground_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/billing":{"get":{"summary":"Billing Page","operationId":"billing_page_billing_get","parameters":[{"name":"flash","in":"query","required":false,"schema":{"type":"string","default":"","title":"Flash"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/topup":{"post":{"summary":"Billing Topup","operationId":"billing_topup_billing_topup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/return":{"get":{"summary":"Billing Return","description":"Moyasar sends the person back here; the money is credited only after we read the invoice ourselves.","operationId":"billing_return_billing_return_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing/webhook":{"post":{"summary":"Billing Webhook","operationId":"billing_webhook_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/credit":{"post":{"summary":"Admin Credit","operationId":"admin_credit_admin_credit_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"summary":"Admin Page","operationId":"admin_page_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/today":{"get":{"summary":"Today Page","operationId":"today_page_today_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/today":{"get":{"summary":"Today Json","operationId":"today_json_v1_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/facts":{"get":{"summary":"Facts List","operationId":"facts_list_v1_facts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/facts/{key}":{"get":{"summary":"Fact One","operationId":"fact_one_v1_facts__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/facts":{"get":{"summary":"Admin Facts","operationId":"admin_facts_admin_facts_get","parameters":[{"name":"flash","in":"query","required":false,"schema":{"type":"string","default":"","title":"Flash"}},{"name":"err","in":"query","required":false,"schema":{"type":"string","default":"","title":"Err"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/facts/refresh":{"post":{"summary":"Admin Refresh","operationId":"admin_refresh_admin_facts_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/facts/manual":{"post":{"summary":"Admin Manual","operationId":"admin_manual_admin_facts_manual_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/train-shared":{"post":{"summary":"Admin Train Shared","operationId":"admin_train_shared_admin_train_shared_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/plan":{"post":{"summary":"Admin Plan","operationId":"admin_plan_admin_plan_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/user":{"post":{"summary":"Admin User","operationId":"admin_user_admin_user_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/org":{"post":{"summary":"Admin Org","operationId":"admin_org_admin_org_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/maintenance":{"post":{"summary":"Admin Maintenance","operationId":"admin_maintenance_admin_maintenance_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/backup":{"post":{"summary":"Admin Backup","operationId":"admin_backup_admin_backup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/password":{"post":{"summary":"Settings Password","operationId":"settings_password_settings_password_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Classification":{"type":"string","enum":["public","internal","confidential","secret"],"title":"Classification","description":"Data classification. Decides which backends may touch the data and\nwhat the audit log is allowed to keep."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JevQuestion":{"properties":{"type":{"type":"string","title":"Type"},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Instructions"},"criteria":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Criteria"}},"type":"object","required":["type","instructions"],"title":"JevQuestion"},"JevRequest":{"properties":{"model":{"type":"string","title":"Model","default":"hasm-latest"},"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"State"},"questions":{"additionalProperties":{"$ref":"#/components/schemas/JevQuestion"},"type":"object","title":"Questions"},"classification":{"$ref":"#/components/schemas/Classification","default":"confidential"},"contract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract"},"policy":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Policy"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags"}},"type":"object","required":["state"],"title":"JevRequest"},"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"}}}}