{"openapi":"3.1.0","info":{"title":"opz API · cybtek-vps-opt","description":"API publique du dashboard opz.\n\n**Authentification** :\n- Cookie de session (UI navigateur)\n- `Authorization: Bearer opz_xxx` (PAT créés depuis Settings → API)\n\n**Multi-tenant** : sélectionner le tenant courant via header `X-Tenant-Id`\n(superadmin uniquement, sinon scope forcé sur tenant home + memberships).","version":"0.2.0"},"paths":{"/api/v1/auth/config":{"get":{"tags":["auth"],"summary":"Auth Config","description":"Indique au front quel mode d'auth est actif.","operationId":"auth_config_api_v1_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Auth Config Api V1 Auth Config Get"}}}}}}},"/api/v1/auth/dev-login":{"post":{"tags":["auth"],"summary":"Dev Login","description":"Login local autorisé uniquement en dev + sans OIDC.","operationId":"dev_login_api_v1_auth_dev_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"get":{"tags":["auth"],"summary":"Oidc Login","operationId":"oidc_login_api_v1_auth_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/callback":{"get":{"tags":["auth"],"summary":"Oidc Callback","operationId":"oidc_callback_api_v1_auth_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/me/onboarded":{"post":{"tags":["auth"],"summary":"Mark Onboarded Ep","description":"Marque le tour interactif comme vu. Idempotent.","operationId":"mark_onboarded_ep_api_v1_auth_me_onboarded_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Mark Onboarded Ep Api V1 Auth Me Onboarded Post"}}}}}}},"/api/v1/auth/me/reset-onboarding":{"post":{"tags":["auth"],"summary":"Reset Onboarding Ep","description":"Permet à un user de relancer son tour interactif.","operationId":"reset_onboarding_ep_api_v1_auth_me_reset_onboarding_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Reset Onboarding Ep Api V1 Auth Me Reset Onboarding Post"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeOut"}}}}}}},"/api/v1/auth/tenants":{"get":{"tags":["auth"],"summary":"List My Tenants","description":"Tenants accessibles à l'user (pour alimenter le TenantSwitcher).\n\n- Superadmin : tous les tenants (archived inclus, signalés via `archived`)\n- Autre : tenant home + tous les tenants où il a un membership N:N","operationId":"list_my_tenants_api_v1_auth_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TenantOption"},"type":"array","title":"Response List My Tenants Api V1 Auth Tenants Get"}}}}}}},"/api/v1/auth/active-tenant":{"post":{"tags":["auth"],"summary":"Set Active Tenant","description":"Change le tenant actif (superadmin only).\n\nPose le cookie `cvo_active_tenant` qui sera lu par la dependency\n`current_tenant_id` à chaque requête. `tenant_id=None` → vue \"all\".","operationId":"set_active_tenant_api_v1_auth_active_tenant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveTenantIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Active Tenant Api V1 Auth Active Tenant Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts":{"get":{"tags":["hosts"],"summary":"List Hosts Ep","operationId":"list_hosts_ep_api_v1_hosts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HostSummary"},"type":"array","title":"Response List Hosts Ep Api V1 Hosts Get"}}}}}},"post":{"tags":["hosts"],"summary":"Create Host Ep","operationId":"create_host_ep_api_v1_hosts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostCreateIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}":{"get":{"tags":["hosts"],"summary":"Host Detail Ep","operationId":"host_detail_ep_api_v1_hosts__host_id__get","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["hosts"],"summary":"Patch Host Ep","description":"Édite un VPS : champs simples + rotation optionnelle des credentials.\n\nPour rotation : envoyer `secret_material` (et `secret_passphrase` si clé chiffrée).","operationId":"patch_host_ep_api_v1_hosts__host_id__patch","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostPatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["hosts"],"summary":"Delete Host Ep","operationId":"delete_host_ep_api_v1_hosts__host_id__delete","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Host Ep Api V1 Hosts  Host Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/applications":{"get":{"tags":["hosts"],"summary":"Host Applications Ep","operationId":"host_applications_ep_api_v1_hosts__host_id__applications_get","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/history":{"get":{"tags":["hosts"],"summary":"Host History Ep","operationId":"host_history_ep_api_v1_hosts__host_id__history_get","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/collect":{"post":{"tags":["hosts"],"summary":"Force Collect Ep","operationId":"force_collect_ep_api_v1_hosts__host_id__collect_post","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recommendations":{"get":{"tags":["recommendations"],"summary":"List Recos Ep","operationId":"list_recos_ep_api_v1_recommendations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/recommendations/regenerate":{"post":{"tags":["recommendations"],"summary":"Regenerate Ep","description":"Régénère les recommandations.\n\n- Superadmin sur vue agrégée (ALL_TENANTS) : régénère TOUTES les recos\n- Superadmin sur un tenant donné : régénère uniquement ce tenant\n- Tenant_admin : régénère uniquement son scope (tenant_id forcé par\n  la dependency)","operationId":"regenerate_ep_api_v1_recommendations_regenerate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/recommendations/{reco_id}/dismiss":{"post":{"tags":["recommendations"],"summary":"Dismiss Ep","operationId":"dismiss_ep_api_v1_recommendations__reco_id__dismiss_post","parameters":[{"name":"reco_id","in":"path","required":true,"schema":{"type":"integer","title":"Reco Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs":{"get":{"tags":["organizations"],"summary":"List Orgs Ep","operationId":"list_orgs_ep_api_v1_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgOut"},"type":"array","title":"Response List Orgs Ep Api V1 Orgs Get"}}}}}},"post":{"tags":["organizations"],"summary":"Create Org Ep","operationId":"create_org_ep_api_v1_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}":{"patch":{"tags":["organizations"],"summary":"Update Org Ep","operationId":"update_org_ep_api_v1_orgs__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["organizations"],"summary":"Delete Org Ep","operationId":"delete_org_ep_api_v1_orgs__org_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Org Ep Api V1 Orgs  Org Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/projects":{"get":{"tags":["organizations"],"summary":"List Projects Ep","operationId":"list_projects_ep_api_v1_orgs__org_id__projects_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectOut"},"title":"Response List Projects Ep Api V1 Orgs  Org Id  Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["organizations"],"summary":"Create Project Ep","operationId":"create_project_ep_api_v1_orgs__org_id__projects_post","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/projects/{project_id}":{"patch":{"tags":["organizations"],"summary":"Update Project Ep","operationId":"update_project_ep_api_v1_orgs_projects__project_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["organizations"],"summary":"Delete Project Ep","operationId":"delete_project_ep_api_v1_orgs_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Project Ep Api V1 Orgs Projects  Project Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/assignments":{"get":{"tags":["organizations"],"summary":"List Assignments Ep","operationId":"list_assignments_ep_api_v1_orgs_assignments_get","parameters":[{"name":"host_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Id"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StackAssignmentOut"},"title":"Response List Assignments Ep Api V1 Orgs Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/assignments/{assign_id}":{"patch":{"tags":["organizations"],"summary":"Patch Assignment Ep","operationId":"patch_assignment_ep_api_v1_orgs_assignments__assign_id__patch","parameters":[{"name":"assign_id","in":"path","required":true,"schema":{"type":"integer","title":"Assign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAssignmentPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAssignmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/assignments/autoassign":{"post":{"tags":["organizations"],"summary":"Autoassign Ep","operationId":"autoassign_ep_api_v1_orgs_assignments_autoassign_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Autoassign Ep Api V1 Orgs Assignments Autoassign Post"}}}}}}},"/api/v1/orgs/seed-defaults":{"post":{"tags":["organizations"],"summary":"Seed Defaults Ep","operationId":"seed_defaults_ep_api_v1_orgs_seed_defaults_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Seed Defaults Ep Api V1 Orgs Seed Defaults Post"}}}}}}},"/api/v1/orgs/summary":{"get":{"tags":["organizations"],"summary":"Summary Ep","operationId":"summary_ep_api_v1_orgs_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Summary Ep Api V1 Orgs Summary Get"}}}}}}},"/api/v1/reports/cost-forecast":{"get":{"tags":["reports"],"summary":"Cost Forecast Ep","operationId":"cost_forecast_ep_api_v1_reports_cost_forecast_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Cost Forecast Ep Api V1 Reports Cost Forecast Get"}}}}}}},"/api/v1/reports/usage":{"get":{"tags":["reports"],"summary":"Usage Ep","operationId":"usage_ep_api_v1_reports_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Usage Ep Api V1 Reports Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/security/images":{"get":{"tags":["security"],"summary":"List Image Scans Ep","description":"Liste les scans d'images vus chez ce tenant.\n\n`image_scans` est global (mutualisation Trivy), mais on filtre via\n`image_usages` pour ne montrer à l'user que les scans des images\neffectivement utilisées chez lui.","operationId":"list_image_scans_ep_api_v1_security_images_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Image Scans Ep Api V1 Security Images Get"}}}}}}},"/api/v1/security/images/scan":{"post":{"tags":["security"],"summary":"Trigger Scan Ep","description":"Lance un scan en arrière-plan (peut prendre 30s-2min selon nb d'images).","operationId":"trigger_scan_ep_api_v1_security_images_scan_post","parameters":[{"name":"cve","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Cve"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/security/wazuh/config":{"get":{"tags":["security"],"summary":"Wazuh Config Ep","description":"Retourne la config Wazuh forward courante (sans révéler de secret).","operationId":"wazuh_config_ep_api_v1_security_wazuh_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Wazuh Config Ep Api V1 Security Wazuh Config Get"}}}}}}},"/api/v1/security/audit":{"get":{"tags":["security"],"summary":"Audit Log Ep","description":"Liste les derniers événements d'audit (chaîne de hash vérifiable).\n\nFiltré par tenant courant. Le superadmin peut voir tous les tenants avec\n`X-Tenant-Id: all`.","operationId":"audit_log_ep_api_v1_security_audit_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"actor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Audit Log Ep Api V1 Security Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/security/audit/verify":{"get":{"tags":["security"],"summary":"Audit Verify Ep","description":"Vérifie l'intégrité de la chaîne d'audit (hash-chain SHA-256).\n\nRéservé au superadmin. `limit` permet de vérifier uniquement les N\ndernières entries (utile sur très gros logs).","operationId":"audit_verify_ep_api_v1_security_audit_verify_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Audit Verify Ep Api V1 Security Audit Verify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/security/wazuh/test":{"post":{"tags":["security"],"summary":"Wazuh Test Ep","description":"Envoie un event de test au manager Wazuh.","operationId":"wazuh_test_ep_api_v1_security_wazuh_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Wazuh Test Ep Api V1 Security Wazuh Test Post"}}}}}}},"/api/v1/tenants":{"get":{"tags":["tenants"],"summary":"List Tenants Ep","operationId":"list_tenants_ep_api_v1_tenants_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantWithStats"},"title":"Response List Tenants Ep Api V1 Tenants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tenants"],"summary":"Create Tenant Ep","operationId":"create_tenant_ep_api_v1_tenants_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}":{"patch":{"tags":["tenants"],"summary":"Update Tenant Ep","operationId":"update_tenant_ep_api_v1_tenants__tenant_id__patch","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Archive Tenant Ep","description":"Archivage (soft delete). La suppression définitive demande un script\ndédié pour éviter les pertes accidentelles (cascade sur ~10 tables).","operationId":"archive_tenant_ep_api_v1_tenants__tenant_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Archive Tenant Ep Api V1 Tenants  Tenant Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}/logo":{"post":{"tags":["tenants"],"summary":"Upload Tenant Logo Ep","description":"Upload logo PNG/JPG/WebP/SVG. Max 200KB. Superadmin only.","operationId":"upload_tenant_logo_ep_api_v1_tenants__tenant_id__logo_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_tenant_logo_ep_api_v1_tenants__tenant_id__logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Upload Tenant Logo Ep Api V1 Tenants  Tenant Id  Logo Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tenants"],"summary":"Delete Tenant Logo Ep","operationId":"delete_tenant_logo_ep_api_v1_tenants__tenant_id__logo_delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Tenant Logo Ep Api V1 Tenants  Tenant Id  Logo Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tenants"],"summary":"Get Tenant Logo Ep","description":"Sert le logo. Authentifié uniquement (tout user authentifié peut voir\nn'importe quel logo de tenant pour les badges UI cross-tenant).","operationId":"get_tenant_logo_ep_api_v1_tenants__tenant_id__logo_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}/sync-zitadel":{"post":{"tags":["tenants"],"summary":"Sync Tenant Zitadel Ep","description":"Déclenche la sync manuelle d'un tenant avec son org Zitadel.\n\nPré-requis : ZITADEL_PAT_TOKEN défini dans .env + tenant.zitadel_org_id\nrenseigné. Sinon retourne `skip_reason`.","operationId":"sync_tenant_zitadel_ep_api_v1_tenants__tenant_id__sync_zitadel_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Sync Tenant Zitadel Ep Api V1 Tenants  Tenant Id  Sync Zitadel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/sync-zitadel-all":{"post":{"tags":["tenants"],"summary":"Sync All Zitadel Ep","description":"Sync tous les tenants Zitadel d'un coup.","operationId":"sync_all_zitadel_ep_api_v1_tenants_sync_zitadel_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Sync All Zitadel Ep Api V1 Tenants Sync Zitadel All Post"}}}}}}},"/api/v1/docs":{"get":{"tags":["docs"],"summary":"List Docs Ep","operationId":"list_docs_ep_api_v1_docs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DocSummary"},"type":"array","title":"Response List Docs Ep Api V1 Docs Get"}}}}}}},"/api/v1/docs/{filename}":{"get":{"tags":["docs"],"summary":"Get Doc Ep","operationId":"get_doc_ep_api_v1_docs__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocContent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/metrics":{"get":{"tags":["metrics"],"summary":"Metrics Ep","description":"Expose les métriques au format Prometheus.","operationId":"metrics_ep_api_v1_metrics_get","responses":{"200":{"description":"Successful Response"}}}},"/api/v1/tenants/{tenant_id}/members":{"get":{"tags":["memberships"],"summary":"List Members Ep","operationId":"list_members_ep_api_v1_tenants__tenant_id__members_get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberDetailOut"},"title":"Response List Members Ep Api V1 Tenants  Tenant Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["memberships"],"summary":"Add Member Ep","operationId":"add_member_ep_api_v1_tenants__tenant_id__members_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tenants/{tenant_id}/members/{user_id}":{"delete":{"tags":["memberships"],"summary":"Remove Member Ep","operationId":"remove_member_ep_api_v1_tenants__tenant_id__members__user_id__delete","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Remove Member Ep Api V1 Tenants  Tenant Id  Members  User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/memberships":{"get":{"tags":["memberships"],"summary":"My Memberships Ep","description":"Liste des tenants accessibles à l'user courant (home + memberships).","operationId":"my_memberships_ep_api_v1_me_memberships_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MyMembershipOut"},"type":"array","title":"Response My Memberships Ep Api V1 Me Memberships Get"}}}}}}},"/api/v1/onboarding/requests":{"post":{"tags":["onboarding"],"summary":"Submit Request Ep","description":"N'importe quel user authentifié peut soumettre une demande.\n\nOn bloque si :\n- une demande PENDING existe déjà pour le même zitadel_org_id\n- un tenant existe déjà avec ce zitadel_org_id (l'admin doit alors\n  ajouter l'user via memberships)","operationId":"submit_request_ep_api_v1_onboarding_requests_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["onboarding"],"summary":"List Requests Ep","operationId":"list_requests_ep_api_v1_onboarding_requests_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequestStatus"},{"type":"null"}],"title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TenantRequestOut"},"title":"Response List Requests Ep Api V1 Onboarding Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/my-requests":{"get":{"tags":["onboarding"],"summary":"My Requests Ep","description":"Liste des demandes de l'user authentifié.","operationId":"my_requests_ep_api_v1_onboarding_my_requests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TenantRequestOut"},"type":"array","title":"Response My Requests Ep Api V1 Onboarding My Requests Get"}}}}}}},"/api/v1/onboarding/requests/{req_id}/approve":{"post":{"tags":["onboarding"],"summary":"Approve Request Ep","description":"Approuve la demande et crée le tenant correspondant.","operationId":"approve_request_ep_api_v1_onboarding_requests__req_id__approve_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/requests/{req_id}/reject":{"post":{"tags":["onboarding"],"summary":"Reject Request Ep","operationId":"reject_request_ep_api_v1_onboarding_requests__req_id__reject_post","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/plans":{"get":{"tags":["billing"],"summary":"List Plans Ep","operationId":"list_plans_ep_api_v1_billing_plans_get","parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlanOut"},"title":"Response List Plans Ep Api V1 Billing Plans Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["billing"],"summary":"Create Plan Ep","operationId":"create_plan_ep_api_v1_billing_plans_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/plans/{plan_id}":{"patch":{"tags":["billing"],"summary":"Update Plan Ep","operationId":"update_plan_ep_api_v1_billing_plans__plan_id__patch","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["billing"],"summary":"Archive Plan Ep","operationId":"archive_plan_ep_api_v1_billing_plans__plan_id__delete","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Archive Plan Ep Api V1 Billing Plans  Plan Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/config":{"get":{"tags":["billing"],"summary":"Get Config Ep","operationId":"get_config_ep_api_v1_billing_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigOut"}}}}}},"post":{"tags":["billing"],"summary":"Set Config Ep","description":"Enregistre les clés Stripe.\n\nOrdre de stockage préféré :\n1. Si OpenBao actif → vault (recommandé en prod)\n2. Sinon → DB locale chiffrée (envelope encryption AES-GCM via la clé\n   maître MASTER_PASSPHRASE)","operationId":"set_config_ep_api_v1_billing_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Set Config Ep Api V1 Billing Config Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/test-stripe-key":{"post":{"tags":["billing"],"summary":"Test Stripe Key Ep","description":"Valide une clé Stripe sans la persister.\n\nPour ne pas ajouter `stripe` aux deps tant que l'utilisateur n'a pas\ndécidé d'activer la facturation, on fait un appel HTTP brut.","operationId":"test_stripe_key_ep_api_v1_billing_test_stripe_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestKeyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Test Stripe Key Ep Api V1 Billing Test Stripe Key Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/tenants/{tenant_id}":{"get":{"tags":["billing"],"summary":"Get Tenant Billing Ep","operationId":"get_tenant_billing_ep_api_v1_billing_tenants__tenant_id__get","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantBillingOut"},{"type":"null"}],"title":"Response Get Tenant Billing Ep Api V1 Billing Tenants  Tenant Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/tenants/{tenant_id}/plan":{"post":{"tags":["billing"],"summary":"Assign Plan Ep","description":"Assigne un plan à un tenant (admin only, free tier ou trial manuel).\n\nPour les vraies subscriptions Stripe, le flow standard est :\n1. Créer une session Stripe Checkout pour le tenant (TODO Phase 4 suite)\n2. Webhook Stripe → met à jour status + IDs","operationId":"assign_plan_ep_api_v1_billing_tenants__tenant_id__plan_post","parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignPlanIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantBillingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout Ep","description":"Crée une session Stripe Checkout pour le tenant courant.\n\nLe tenant courant est `actor.tenant_id` (les superadmins doivent\nexplicitement switch tenant avant).","operationId":"create_checkout_ep_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/quota":{"get":{"tags":["billing"],"summary":"Get Quota Ep","description":"État courant des quotas du tenant actif.","operationId":"get_quota_ep_api_v1_billing_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal Ep","description":"Crée une session Stripe Customer Portal pour gérer l'abonnement.","operationId":"create_portal_ep_api_v1_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalOut"}}}}}}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook Ep","description":"Reçoit les events Stripe et met à jour `TenantBilling`.\n\nVérifie la signature HMAC (whsec) avant de traiter. Le secret est lu\ndepuis le storage configuré (vault/db/env).","operationId":"stripe_webhook_ep_api_v1_billing_webhook_post","parameters":[{"name":"stripe-signature","in":"header","required":false,"schema":{"type":"string","default":"","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Stripe Webhook Ep Api V1 Billing Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contact":{"post":{"tags":["contact"],"summary":"Submit Contact Request","description":"Reçoit une demande publique. Honeypot anti-bot inclus.\n\nLe rate limit IP est appliqué par RateLimitMiddleware (profil mutation : 60 req/min).","operationId":"submit_contact_request_api_v1_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequestIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contact/requests/pending-count":{"get":{"tags":["contact"],"summary":"Pending Count","description":"Count des demandes new+processing. Endpoint léger pour polling badge.","operationId":"pending_count_api_v1_contact_requests_pending_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/contact/requests":{"get":{"tags":["contact"],"summary":"List Contact Requests","operationId":"list_contact_requests_api_v1_contact_requests_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContactRequestOut"},"title":"Response List Contact Requests Api V1 Contact Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contact/requests/{req_id}":{"get":{"tags":["contact"],"summary":"Get Contact Request","operationId":"get_contact_request_api_v1_contact_requests__req_id__get","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Get Contact Request Api V1 Contact Requests  Req Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contact"],"summary":"Update Contact Request","operationId":"update_contact_request_api_v1_contact_requests__req_id__patch","parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","title":"Req Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/profiles":{"get":{"tags":["ai"],"summary":"List Profiles","operationId":"list_profiles_api_v1_ai_profiles_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AiProfileOut"},"title":"Response List Profiles Api V1 Ai Profiles Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ai"],"summary":"Create Profile","operationId":"create_profile_api_v1_ai_profiles_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/profiles/{profile_id}":{"patch":{"tags":["ai"],"summary":"Update Profile","operationId":"update_profile_api_v1_ai_profiles__profile_id__patch","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ai"],"summary":"Archive Profile","operationId":"archive_profile_api_v1_ai_profiles__profile_id__delete","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/analyze":{"post":{"tags":["ai"],"summary":"Trigger Analyze","operationId":"trigger_analyze_api_v1_ai_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiAnalysisOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/analyses":{"get":{"tags":["ai"],"summary":"List Analyses","operationId":"list_analyses_api_v1_ai_analyses_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AiAnalysisOut"},"title":"Response List Analyses Api V1 Ai Analyses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/analyses/{aid}":{"get":{"tags":["ai"],"summary":"Get Analysis","operationId":"get_analysis_api_v1_ai_analyses__aid__get","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"integer","title":"Aid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ai/config":{"get":{"tags":["ai"],"summary":"Config","description":"État config : clé tenant + clé globale.","operationId":"config_api_v1_ai_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Config Api V1 Ai Config Get"}}}}}}},"/api/v1/ai/tenant-key":{"post":{"tags":["ai"],"summary":"Set Tenant Key","description":"Le tenant_admin configure sa propre clé OpenRouter (DB chiffrée).","operationId":"set_tenant_key_api_v1_ai_tenant_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantKeyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/modulejail/status":{"get":{"tags":["modulejail"],"summary":"Status Ep","operationId":"status_ep_api_v1_hosts__host_id__modulejail_status_get","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/modulejail/install":{"post":{"tags":["modulejail"],"summary":"Install Ep","operationId":"install_ep_api_v1_hosts__host_id__modulejail_install_post","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/modulejail/uninstall":{"post":{"tags":["modulejail"],"summary":"Uninstall Ep","operationId":"uninstall_ep_api_v1_hosts__host_id__modulejail_uninstall_post","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/hosts/{host_id}/modulejail/runs":{"get":{"tags":["modulejail"],"summary":"Runs Ep","operationId":"runs_ep_api_v1_hosts__host_id__modulejail_runs_get","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/api-tokens":{"get":{"tags":["api-tokens"],"summary":"List Tokens Ep","operationId":"list_tokens_ep_api_v1_me_api_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TokenOut"},"type":"array","title":"Response List Tokens Ep Api V1 Me Api Tokens Get"}}}}}},"post":{"tags":["api-tokens"],"summary":"Create Token Ep","operationId":"create_token_ep_api_v1_me_api_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/api-tokens/{token_id}":{"delete":{"tags":["api-tokens"],"summary":"Revoke Token Ep","operationId":"revoke_token_ep_api_v1_me_api_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Revoke Token Ep Api V1 Me Api Tokens  Token Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/zitadel":{"post":{"tags":["webhooks"],"summary":"Zitadel Webhook Ep","description":"Réceptionne un event Zitadel.\n\nEvents supportés (Phase 5.0) :\n- `user.created`  → upsert user en DB côté opz\n- `user.deactivated` → désactive le user (enabled=False) côté opz\n- `user.reactivated` → réactive\n- `user.removed`  → soft delete côté opz (enabled=False)\n- `user.email.changed` / `user.profile.changed` → MAJ champs\n\nFormat payload : selon la config Action Zitadel. On accepte un schéma\npermissif : `{\"event_type\": \"...\", \"user\": {...}, \"org_id\": \"...\"}`.","operationId":"zitadel_webhook_ep_api_v1_webhooks_zitadel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Zitadel Webhook Ep Api V1 Webhooks Zitadel Post"}}}}}}},"/api/v1/custom-recos":{"get":{"tags":["custom-recos"],"summary":"List Custom Recos Ep","operationId":"list_custom_recos_ep_api_v1_custom_recos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomRecoOut"},"type":"array","title":"Response List Custom Recos Ep Api V1 Custom Recos Get"}}}}}},"post":{"tags":["custom-recos"],"summary":"Create Custom Reco Ep","operationId":"create_custom_reco_ep_api_v1_custom_recos_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRecoIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRecoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom-recos/{reco_id}":{"patch":{"tags":["custom-recos"],"summary":"Update Custom Reco Ep","operationId":"update_custom_reco_ep_api_v1_custom_recos__reco_id__patch","parameters":[{"name":"reco_id","in":"path","required":true,"schema":{"type":"integer","title":"Reco Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRecoPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRecoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["custom-recos"],"summary":"Delete Custom Reco Ep","operationId":"delete_custom_reco_ep_api_v1_custom_recos__reco_id__delete","parameters":[{"name":"reco_id","in":"path","required":true,"schema":{"type":"integer","title":"Reco Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Custom Reco Ep Api V1 Custom Recos  Reco Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom-recos/marketplace":{"get":{"tags":["custom-recos"],"summary":"List Marketplace Ep","description":"Liste les recos custom marquées publiques (toutes tenants confondus).\n\nLecture only — pour cloner une reco vers son tenant, utiliser\nPOST /custom-recos/marketplace/{reco_id}/clone.","operationId":"list_marketplace_ep_api_v1_custom_recos_marketplace_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CustomRecoOut"},"type":"array","title":"Response List Marketplace Ep Api V1 Custom Recos Marketplace Get"}}}}}}},"/api/v1/custom-recos/marketplace/{reco_id}/clone":{"post":{"tags":["custom-recos"],"summary":"Clone Marketplace Reco Ep","description":"Clone une reco publique du marketplace vers le tenant courant.\n\nLe clone est créé désactivé par défaut (sécurité : tu reviews avant\nd'activer). Le slug est suffixé `-clone-N` si conflit.","operationId":"clone_marketplace_reco_ep_api_v1_custom_recos_marketplace__reco_id__clone_post","parameters":[{"name":"reco_id","in":"path","required":true,"schema":{"type":"integer","title":"Reco Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRecoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/custom-recos/{reco_id}/test":{"post":{"tags":["custom-recos"],"summary":"Test Custom Reco Ep","description":"Évalue la condition sur un host précis pour preview.","operationId":"test_custom_reco_ep_api_v1_custom_recos__reco_id__test_post","parameters":[{"name":"reco_id","in":"path","required":true,"schema":{"type":"integer","title":"Reco Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Test Custom Reco Ep Api V1 Custom Recos  Reco Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/context":{"get":{"tags":["insights"],"summary":"Insights Context Ep","description":"Snapshot LLM-ready de l'état de l'infrastructure.\n\nFormat pensé pour être passé directement comme context à Claude/GPT-4.\nCompressé (pas de JSON payload des snapshots, juste les agrégats).","operationId":"insights_context_ep_api_v1_insights_context_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Insights Context Ep Api V1 Insights Context Get"}}}}}}},"/api/v1/insights/action-plan":{"get":{"tags":["insights"],"summary":"Action Plan Ep","description":"Plan d'action priorisé : actions exécutables avec gains chiffrés.\n\nDifférent de `/context` qui est un snapshot brut LLM-ready :\n`/action-plan` est une liste **actionnable** triée par ROI, prête à\nêtre exécutée par un agent (human-in-the-loop ou auto avec validation).\n\nChaque action contient :\n- `id` : référence stable (`reco:42`)\n- `priority` (1=top), `severity`, `estimated_savings_eur_month`\n- `action_type` : \"dismiss\" | \"investigate\" | \"consolidate\" | \"scale-up\" | …\n- `target_resource` : ce qui doit être touché\n- `confidence` : 0-1, niveau de certitude\n- `human_review_required` : true par défaut pour les actions destructives","operationId":"action_plan_ep_api_v1_insights_action_plan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Action Plan Ep Api V1 Insights Action Plan Get"}}}}}}},"/api/v1/insights/prompt-template":{"get":{"tags":["insights"],"summary":"Prompt Template Ep","description":"Retourne un prompt template prêt à l'emploi pour analyse LLM.\n\nL'idée : tu appelles `/insights/context` (JSON), puis tu envoies au LLM\n`prompt + context`. opz ne fait pas l'appel LLM lui-même (coût + secrets\n+ flexibilité fournisseur).","operationId":"prompt_template_ep_api_v1_insights_prompt_template_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Prompt Template Ep Api V1 Insights Prompt Template Get"}}}}}}},"/api/v1/outgoing-webhooks":{"get":{"tags":["outgoing-webhooks"],"summary":"List Webhooks Ep","operationId":"list_webhooks_ep_api_v1_outgoing_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookOut"},"type":"array","title":"Response List Webhooks Ep Api V1 Outgoing Webhooks Get"}}}}}},"post":{"tags":["outgoing-webhooks"],"summary":"Create Webhook Ep","operationId":"create_webhook_ep_api_v1_outgoing_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/outgoing-webhooks/{webhook_id}":{"patch":{"tags":["outgoing-webhooks"],"summary":"Update Webhook Ep","operationId":"update_webhook_ep_api_v1_outgoing_webhooks__webhook_id__patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["outgoing-webhooks"],"summary":"Delete Webhook Ep","operationId":"delete_webhook_ep_api_v1_outgoing_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Webhook Ep Api V1 Outgoing Webhooks  Webhook Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/outgoing-webhooks/{webhook_id}/test":{"post":{"tags":["outgoing-webhooks"],"summary":"Test Webhook Ep","description":"Envoie un event de test pour valider l'URL et la config.","operationId":"test_webhook_ep_api_v1_outgoing_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Test Webhook Ep Api V1 Outgoing Webhooks  Webhook Id  Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/federation/marketplace":{"get":{"tags":["federation"],"summary":"Federated Marketplace Ep","description":"Agrège les marketplaces de toutes les instances fédérées.\n\nLecture only — superadmin uniquement. Pour cloner une reco fédérée\nvers son tenant, copier le `condition_expr` + le `slug` et utiliser\nPOST /custom-recos avec ces valeurs (Phase 7 — pas d'auto-clone fédéré\npour des raisons de trust).","operationId":"federated_marketplace_ep_api_v1_federation_marketplace_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Federated Marketplace Ep Api V1 Federation Marketplace Get"}}}}}}},"/api/v1/federation/marketplace/refresh":{"post":{"tags":["federation"],"summary":"Refresh Marketplace Ep","description":"Force le refresh du cache fédération (purge + refetch).","operationId":"refresh_marketplace_ep_api_v1_federation_marketplace_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Refresh Marketplace Ep Api V1 Federation Marketplace Refresh Post"}}}}}}},"/api/v1/usage":{"get":{"tags":["usage"],"summary":"Usage Self Ep","description":"Rapport d'usage du tenant courant (tenant_admin OK).\n\nSuperadmin sur ALL_TENANTS → retourne le rapport agrégé global.","operationId":"usage_self_ep_api_v1_usage_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Usage Self Ep Api V1 Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/all":{"get":{"tags":["usage"],"summary":"Usage All Ep","description":"Rapport d'usage de tous les tenants (superadmin).","operationId":"usage_all_ep_api_v1_usage_all_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Usage All Ep Api V1 Usage All Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/csv":{"get":{"tags":["usage"],"summary":"Usage Csv Ep","description":"Export CSV du rapport all tenants (superadmin).\n\nIdéal pour import dans tableur ou comptabilité.","operationId":"usage_csv_ep_api_v1_usage_csv_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["day","week","month"],"type":"string","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plugins":{"get":{"tags":["plugins"],"summary":"List Plugins Ep","description":"Liste les plugins chargés et leurs hooks.","operationId":"list_plugins_ep_api_v1_plugins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response List Plugins Ep Api V1 Plugins Get"}}}}}}},"/api/v1/plugins/registry":{"get":{"tags":["plugins"],"summary":"Plugin Registry Ep","description":"Liste les plugins disponibles depuis un registre officiel.\n\nLe registre est un fichier JSON hébergé (Cybtek ou tiers) au format :\n\n    {\n      \"version\": 1,\n      \"updated_at\": \"2026-05-18T10:00:00Z\",\n      \"plugins\": [\n        {\n          \"name\": \"opz-plugin-pagerduty\",\n          \"summary\": \"Forward critical events to PagerDuty incidents\",\n          \"version\": \"1.2.0\",\n          \"pypi\": \"opz-plugin-pagerduty\",\n          \"homepage\": \"https://github.com/...\",\n          \"author\": \"Cybtek\",\n          \"verified\": true,\n          \"categories\": [\"alerting\"]\n        },\n        ...\n      ]\n    }\n\nCache 10 min côté opz. Configure via env `PLUGIN_REGISTRY_URL`.","operationId":"plugin_registry_ep_api_v1_plugins_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Plugin Registry Ep Api V1 Plugins Registry Get"}}}}}}},"/api/v1/plugins/registry/refresh":{"post":{"tags":["plugins"],"summary":"Refresh Registry Ep","description":"Force le refresh du cache registry.","operationId":"refresh_registry_ep_api_v1_plugins_registry_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Refresh Registry Ep Api V1 Plugins Registry Refresh Post"}}}}}}},"/api/v1/workflows":{"get":{"tags":["workflows"],"summary":"List Workflows Ep","operationId":"list_workflows_ep_api_v1_workflows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowOut"},"type":"array","title":"Response List Workflows Ep Api V1 Workflows Get"}}}}}},"post":{"tags":["workflows"],"summary":"Create Workflow Ep","operationId":"create_workflow_ep_api_v1_workflows_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}":{"patch":{"tags":["workflows"],"summary":"Update Workflow Ep","operationId":"update_workflow_ep_api_v1_workflows__workflow_id__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workflows"],"summary":"Delete Workflow Ep","operationId":"delete_workflow_ep_api_v1_workflows__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Delete Workflow Ep Api V1 Workflows  Workflow Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflows/{workflow_id}/run":{"post":{"tags":["workflows"],"summary":"Run Workflow Ep","description":"Exécute manuellement un workflow (test).","operationId":"run_workflow_ep_api_v1_workflows__workflow_id__run_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Run Workflow Ep Api V1 Workflows  Workflow Id  Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ask":{"post":{"tags":["llm"],"summary":"Ask Ep","description":"Pose une question sur l'état d'opz en langage naturel.\n\nModes :\n- Avec `LLM_API_KEY` configurée : appelle Anthropic, retourne la réponse\n- Sans clé : retourne le context + prompt en preview (BYO LLM externe)","operationId":"ask_ep_api_v1_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Ask Ep Api V1 Ask Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ask/config":{"get":{"tags":["llm"],"summary":"Ask Config Ep","description":"Statut de la config LLM (sans révéler la clé).","operationId":"ask_config_ep_api_v1_ask_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Ask Config Ep Api V1 Ask Config Get"}}}}}}},"/api/v1/hosts/{host_id}/terminal/check":{"get":{"tags":["terminal"],"summary":"Terminal Check Ep","description":"Indique au front si le terminal est accessible depuis cette IP.","operationId":"terminal_check_ep_api_v1_hosts__host_id__terminal_check_get","parameters":[{"name":"host_id","in":"path","required":true,"schema":{"type":"integer","title":"Host Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Terminal Check Ep Api V1 Hosts  Host Id  Terminal Check Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health":{"get":{"summary":"Health","description":"Check rapide : appli a boot. Utilisé par le Docker healthcheck.","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Health Get"}}}}}}},"/api/v1/incidents":{"get":{"summary":"Incidents Ep","description":"Liste publique des incidents récents (status page).","operationId":"incidents_ep_api_v1_incidents_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/deep":{"get":{"summary":"Health Deep","description":"Check complet : DB + scheduler + backup + migration.\n\nPublic (pas de secrets exposés), retourne 200 si OK/warn et 503 si fail.\nConçu pour les sondes externes (Uptime Kuma, etc.) et l'UI dashboard.","operationId":"health_deep_api_v1_health_deep_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/version":{"get":{"summary":"Version Ep","description":"Expose version + profil de déploiement. Public, pas de secrets.","operationId":"version_ep_api_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Version Ep Api V1 Version Get"}}}}}}},"/api/v1/backup/status":{"get":{"summary":"Backup Status Ep","description":"État des sauvegardes locales (admin only via current_user requis côté caller).\n\nPublic ici pour cohérence avec /health/deep — pas de données sensibles\n(juste noms de fichiers + tailles + dates).","operationId":"backup_status_ep_api_v1_backup_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ActiveTenantIn":{"properties":{"tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenant Id"}},"type":"object","required":["tenant_id"],"title":"ActiveTenantIn"},"AddMemberIn":{"properties":{"user_email":{"type":"string","title":"User Email"},"role":{"$ref":"#/components/schemas/UserRole","default":"tenant_viewer"}},"type":"object","required":["user_email"],"title":"AddMemberIn"},"AiAnalysisOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenant Id"},"profile_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Id"},"scope":{"type":"string","title":"Scope"},"host_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Id"},"requested_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested By"},"trigger":{"type":"string","title":"Trigger"},"status":{"type":"string","title":"Status"},"model_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Used"},"tokens_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens In"},"tokens_out":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Out"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","tenant_id","profile_id","scope","host_id","requested_by","trigger","status","model_used","tokens_in","tokens_out","latency_ms","summary","started_at","finished_at"],"title":"AiAnalysisOut"},"AiProfileIn":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":2,"title":"Slug"},"name":{"type":"string","maxLength":120,"minLength":2,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model":{"type":"string","maxLength":120,"minLength":3,"title":"Model"},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","default":0.3},"max_tokens":{"type":"integer","maximum":16000.0,"minimum":200.0,"title":"Max Tokens","default":2400},"scope":{"type":"string","maxLength":32,"title":"Scope","default":"fleet"},"system_prompt":{"type":"string","maxLength":8000,"minLength":10,"title":"System Prompt"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["slug","name","model","system_prompt"],"title":"AiProfileIn"},"AiProfileOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenant Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model":{"type":"string","title":"Model"},"temperature":{"type":"number","title":"Temperature"},"max_tokens":{"type":"integer","title":"Max Tokens"},"scope":{"type":"string","title":"Scope"},"system_prompt":{"type":"string","title":"System Prompt"},"is_default":{"type":"boolean","title":"Is Default"},"is_archived":{"type":"boolean","title":"Is Archived"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By"}},"type":"object","required":["id","tenant_id","slug","name","description","model","temperature","max_tokens","scope","system_prompt","is_default","is_archived","updated_at","updated_by"],"title":"AiProfileOut"},"AiProfilePatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature"},"max_tokens":{"anyOf":[{"type":"integer","maximum":16000.0,"minimum":200.0},{"type":"null"}],"title":"Max Tokens"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Archived"}},"type":"object","title":"AiProfilePatch"},"AnalyzeIn":{"properties":{"profile_id":{"type":"integer","title":"Profile Id"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"host_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Id"},"user_question":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"User Question"}},"type":"object","required":["profile_id"],"title":"AnalyzeIn"},"ApiTokenScope":{"type":"string","enum":["read","admin"],"title":"ApiTokenScope"},"AskIn":{"properties":{"question":{"type":"string","maxLength":2000,"minLength":3,"title":"Question"},"override_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Override Api Key"},"model":{"type":"string","title":"Model","default":"claude-opus-4-7"}},"type":"object","required":["question"],"title":"AskIn"},"AssignPlanIn":{"properties":{"plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"}},"type":"object","required":["plan_id"],"title":"AssignPlanIn"},"Body_upload_tenant_logo_ep_api_v1_tenants__tenant_id__logo_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_tenant_logo_ep_api_v1_tenants__tenant_id__logo_post"},"CheckoutIn":{"properties":{"plan_id":{"type":"integer","title":"Plan Id"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"}},"type":"object","required":["plan_id"],"title":"CheckoutIn"},"CheckoutOut":{"properties":{"url":{"type":"string","title":"Url"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["url","session_id"],"title":"CheckoutOut"},"ConfigIn":{"properties":{"secret_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Key"},"webhook_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Secret"}},"type":"object","title":"ConfigIn"},"ConfigOut":{"properties":{"has_secret_key":{"type":"boolean","title":"Has Secret Key"},"has_webhook_secret":{"type":"boolean","title":"Has Webhook Secret"},"storage":{"type":"string","title":"Storage"}},"type":"object","required":["has_secret_key","has_webhook_secret","storage"],"title":"ConfigOut"},"ConnectionMode":{"type":"string","enum":["ssh_key","ssh_password","local"],"title":"ConnectionMode"},"ContactRequestIn":{"properties":{"full_name":{"type":"string","maxLength":180,"minLength":2,"title":"Full Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"role":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Role"},"company":{"type":"string","maxLength":180,"minLength":1,"title":"Company"},"company_size":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Company Size"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"address_line1":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Address Line2"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"plan_interest":{"anyOf":[{"type":"string","enum":["early_access","free","pro","business","enterprise"]},{"type":"null"}],"title":"Plan Interest"},"vps_count":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Vps Count"},"use_case":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Use Case"},"source":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Source"},"gdpr_consent":{"type":"boolean","title":"Gdpr Consent","default":false},"locale":{"anyOf":[{"type":"string","enum":["fr","en"]},{"type":"null"}],"title":"Locale"},"website_url":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website Url"}},"type":"object","required":["full_name","email","company"],"title":"ContactRequestIn","description":"Payload public — uniquement les champs vraiment nécessaires sont requis,\nle reste est facultatif pour ne pas freiner la conversion."},"ContactRequestOut":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"company":{"type":"string","title":"Company"},"plan_interest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Interest"},"status":{"type":"string","title":"Status"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"}},"type":"object","required":["id","full_name","email","company","plan_interest","status","submitted_at","processed_at","locale"],"title":"ContactRequestOut"},"CustomRecoIn":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":1,"title":"Slug"},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"detail":{"type":"string","title":"Detail","default":""},"severity":{"$ref":"#/components/schemas/RecoSeverity","default":"medium"},"condition_expr":{"type":"string","minLength":1,"title":"Condition Expr"},"trigger":{"$ref":"#/components/schemas/CustomRecoTrigger","default":"daily"},"estimated_savings":{"type":"object","title":"Estimated Savings"},"enabled":{"type":"boolean","title":"Enabled","default":true},"is_public":{"type":"boolean","title":"Is Public","default":false}},"type":"object","required":["slug","title","condition_expr"],"title":"CustomRecoIn"},"CustomRecoOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"detail":{"type":"string","title":"Detail"},"severity":{"$ref":"#/components/schemas/RecoSeverity"},"condition_expr":{"type":"string","title":"Condition Expr"},"trigger":{"$ref":"#/components/schemas/CustomRecoTrigger"},"estimated_savings":{"type":"object","title":"Estimated Savings"},"enabled":{"type":"boolean","title":"Enabled"},"is_public":{"type":"boolean","title":"Is Public"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","slug","title","detail","severity","condition_expr","trigger","estimated_savings","enabled","is_public","created_by","created_at"],"title":"CustomRecoOut"},"CustomRecoPatch":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"severity":{"anyOf":[{"$ref":"#/components/schemas/RecoSeverity"},{"type":"null"}]},"condition_expr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Expr"},"trigger":{"anyOf":[{"$ref":"#/components/schemas/CustomRecoTrigger"},{"type":"null"}]},"estimated_savings":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Estimated Savings"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}},"type":"object","title":"CustomRecoPatch"},"CustomRecoTrigger":{"type":"string","enum":["snapshot","daily"],"title":"CustomRecoTrigger","description":"Quand évaluer la règle."},"DevLoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"passphrase":{"type":"string","title":"Passphrase"}},"type":"object","required":["email","passphrase"],"title":"DevLoginIn"},"DocContent":{"properties":{"filename":{"type":"string","title":"Filename"},"title":{"type":"string","title":"Title"},"audience":{"type":"string","title":"Audience"},"content":{"type":"string","title":"Content"}},"type":"object","required":["filename","title","audience","content"],"title":"DocContent"},"DocSummary":{"properties":{"filename":{"type":"string","title":"Filename"},"title":{"type":"string","title":"Title"},"category":{"type":"string","title":"Category"},"audience":{"type":"string","title":"Audience"},"size_bytes":{"type":"integer","title":"Size Bytes"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["filename","title","category","audience","size_bytes","available"],"title":"DocSummary"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HostCreateIn":{"properties":{"label":{"type":"string","maxLength":180,"minLength":1,"title":"Label"},"hostname":{"type":"string","maxLength":255,"minLength":1,"title":"Hostname"},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","default":22},"username":{"type":"string","maxLength":64,"title":"Username","default":"root"},"connection_mode":{"$ref":"#/components/schemas/ConnectionMode","default":"ssh_key"},"secret_material":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Material"},"secret_passphrase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Passphrase"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"monthly_cost_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Eur"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"}},"type":"object","required":["label","hostname"],"title":"HostCreateIn"},"HostDetail":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"type":"string","title":"Label"},"hostname":{"type":"string","title":"Hostname"},"port":{"type":"integer","title":"Port"},"username":{"type":"string","title":"Username"},"connection_mode":{"$ref":"#/components/schemas/ConnectionMode"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"monthly_cost_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Eur"},"enabled":{"type":"boolean","title":"Enabled"},"status":{"$ref":"#/components/schemas/HostStatus"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"metrics":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["id","label","hostname","port","username","connection_mode","description","provider","monthly_cost_eur","enabled","status","last_seen_at","last_error","group_id","created_at"],"title":"HostDetail"},"HostOut":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"type":"string","title":"Label"},"hostname":{"type":"string","title":"Hostname"},"port":{"type":"integer","title":"Port"},"username":{"type":"string","title":"Username"},"connection_mode":{"$ref":"#/components/schemas/ConnectionMode"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"monthly_cost_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Eur"},"enabled":{"type":"boolean","title":"Enabled"},"status":{"$ref":"#/components/schemas/HostStatus"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","label","hostname","port","username","connection_mode","description","provider","monthly_cost_eur","enabled","status","last_seen_at","last_error","group_id","created_at"],"title":"HostOut"},"HostPatchIn":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":180,"minLength":1},{"type":"null"}],"title":"Label"},"hostname":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Hostname"},"port":{"anyOf":[{"type":"integer","maximum":65535.0,"minimum":1.0},{"type":"null"}],"title":"Port"},"username":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Username"},"connection_mode":{"anyOf":[{"$ref":"#/components/schemas/ConnectionMode"},{"type":"null"}]},"secret_material":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Material"},"secret_passphrase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Passphrase"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"monthly_cost_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Eur"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"HostPatchIn","description":"Pour édition / rotation : tous les champs sont optionnels.\nSi `secret_material` est fourni, on rotate les credentials chiffrés."},"HostStatus":{"type":"string","enum":["unknown","healthy","warning","critical","unreachable"],"title":"HostStatus"},"HostSummary":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"type":"string","title":"Label"},"hostname":{"type":"string","title":"Hostname"},"status":{"$ref":"#/components/schemas/HostStatus"},"cpu_percent":{"type":"number","title":"Cpu Percent","default":0.0},"mem_percent":{"type":"number","title":"Mem Percent","default":0.0},"disk_percent":{"type":"number","title":"Disk Percent","default":0.0},"containers_running":{"type":"integer","title":"Containers Running","default":0},"containers_total":{"type":"integer","title":"Containers Total","default":0},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"monthly_cost_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Cost Eur"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},"type":"object","required":["id","label","hostname","status"],"title":"HostSummary","description":"Vue rapide pour overview multi-VPS."},"InstallBody":{"properties":{"profile":{"type":"string","title":"Profile","description":"minimal | conservative | desktop"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["profile"],"title":"InstallBody"},"MeOut":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenant Id"},"tenant_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Slug"},"tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Name"},"tenant_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tenant Color"},"is_superadmin":{"type":"boolean","title":"Is Superadmin"},"onboarded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarded At"},"active_tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Tenant Id"},"active_tenant_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Tenant Slug"},"active_tenant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Tenant Name"},"active_tenant_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Tenant Color"},"active_tenant_managed":{"type":"boolean","title":"Active Tenant Managed"},"all_tenants_view":{"type":"boolean","title":"All Tenants View"}},"type":"object","required":["email","name","role","tenant_id","tenant_slug","tenant_name","tenant_color","is_superadmin","onboarded_at","active_tenant_id","active_tenant_slug","active_tenant_name","active_tenant_color","active_tenant_managed","all_tenants_view"],"title":"MeOut"},"MemberDetailOut":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"role":{"$ref":"#/components/schemas/UserRole"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"}},"type":"object","required":["id","user_id","tenant_id","role","created_at","user_email","user_name"],"title":"MemberDetailOut"},"MyMembershipOut":{"properties":{"tenant_id":{"type":"integer","title":"Tenant Id"},"tenant_slug":{"type":"string","title":"Tenant Slug"},"tenant_name":{"type":"string","title":"Tenant Name"},"role":{"$ref":"#/components/schemas/UserRole"},"is_home":{"type":"boolean","title":"Is Home"}},"type":"object","required":["tenant_id","tenant_slug","tenant_name","role","is_home"],"title":"MyMembershipOut"},"OrgIn":{"properties":{"name":{"type":"string","maxLength":180,"minLength":1,"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"kind":{"$ref":"#/components/schemas/OrgKind","default":"internal"},"color":{"type":"string","title":"Color","default":"#6366f1"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"monthly_budget_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Eur"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"OrgIn"},"OrgKind":{"type":"string","enum":["internal","client","partner","personal"],"title":"OrgKind"},"OrgOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/OrgKind"},"color":{"type":"string","title":"Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"monthly_budget_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Eur"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"archived":{"type":"boolean","title":"Archived"}},"type":"object","required":["id","slug","name","kind","color","logo_url","contact_email","monthly_budget_eur","description","archived"],"title":"OrgOut"},"PlanIn":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":1,"title":"Slug"},"name":{"type":"string","maxLength":180,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_amount":{"type":"number","minimum":0.0,"title":"Price Amount"},"currency":{"type":"string","title":"Currency","default":"EUR"},"interval":{"$ref":"#/components/schemas/PlanInterval","default":"month"},"max_vps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Vps"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users"},"features":{"type":"object","title":"Features"},"stripe_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Product Id"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"active":{"type":"boolean","title":"Active","default":true},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["slug","name","price_amount"],"title":"PlanIn"},"PlanInterval":{"type":"string","enum":["month","year"],"title":"PlanInterval"},"PlanOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_amount":{"type":"number","title":"Price Amount"},"currency":{"type":"string","title":"Currency"},"interval":{"$ref":"#/components/schemas/PlanInterval"},"max_vps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Vps"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"features":{"type":"object","title":"Features"},"stripe_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Product Id"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"active":{"type":"boolean","title":"Active"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","slug","name","description","price_amount","currency","interval","max_vps","max_users","features","stripe_product_id","stripe_price_id","active","sort_order"],"title":"PlanOut"},"PlanPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Price Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"interval":{"anyOf":[{"$ref":"#/components/schemas/PlanInterval"},{"type":"null"}]},"max_vps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Vps"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users"},"features":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Features"},"stripe_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Product Id"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"PlanPatch"},"PortalOut":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalOut"},"ProjectEnv":{"type":"string","enum":["prod","staging","dev","perso"],"title":"ProjectEnv"},"ProjectIn":{"properties":{"name":{"type":"string","maxLength":180,"minLength":1,"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"organization_id":{"type":"integer","title":"Organization Id"},"env":{"$ref":"#/components/schemas/ProjectEnv","default":"prod"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["name","organization_id"],"title":"ProjectIn"},"ProjectOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"organization_id":{"type":"integer","title":"Organization Id"},"env":{"$ref":"#/components/schemas/ProjectEnv"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"archived":{"type":"boolean","title":"Archived"}},"type":"object","required":["id","slug","name","organization_id","env","owner","description","color","archived"],"title":"ProjectOut"},"RecoSeverity":{"type":"string","enum":["info","low","medium","high","critical"],"title":"RecoSeverity"},"ReviewIn":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"ReviewIn"},"StackAssignmentOut":{"properties":{"id":{"type":"integer","title":"Id"},"host_id":{"type":"integer","title":"Host Id"},"stack_key":{"type":"string","title":"Stack Key"},"source":{"type":"string","title":"Source"},"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"},"pinned":{"type":"boolean","title":"Pinned"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["id","host_id","stack_key","source","project_id","pinned","notes"],"title":"StackAssignmentOut"},"StackAssignmentPatch":{"properties":{"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"StackAssignmentPatch"},"SubmitRequestIn":{"properties":{"requested_name":{"type":"string","maxLength":180,"minLength":2,"title":"Requested Name"},"zitadel_org_id":{"type":"string","maxLength":64,"minLength":1,"title":"Zitadel Org Id"},"zitadel_org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Org Name"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"}},"type":"object","required":["requested_name","zitadel_org_id"],"title":"SubmitRequestIn"},"SubscriptionStatus":{"type":"string","enum":["none","trialing","active","past_due","canceled","unpaid"],"title":"SubscriptionStatus"},"TenantBillingOut":{"properties":{"tenant_id":{"type":"integer","title":"Tenant Id"},"plan_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Id"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"}},"type":"object","required":["tenant_id","plan_id","status","stripe_customer_id","stripe_subscription_id"],"title":"TenantBillingOut"},"TenantCreate":{"properties":{"name":{"type":"string","maxLength":180,"minLength":1,"title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"kind":{"$ref":"#/components/schemas/TenantKind","default":"client"},"color":{"type":"string","title":"Color","default":"#6366f1"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"managed_by_superadmin":{"type":"boolean","title":"Managed By Superadmin","default":false},"monthly_budget_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Eur"},"quota_max_vps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quota Max Vps"},"quota_max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quota Max Users"},"zitadel_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Org Id"}},"type":"object","required":["name"],"title":"TenantCreate"},"TenantKeyIn":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},"type":"object","title":"TenantKeyIn"},"TenantKind":{"type":"string","enum":["internal","client","partner","personal"],"title":"TenantKind"},"TenantOption":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color"},"archived":{"type":"boolean","title":"Archived"}},"type":"object","required":["id","slug","name","color","archived"],"title":"TenantOption"},"TenantOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/TenantKind"},"color":{"type":"string","title":"Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"managed_by_superadmin":{"type":"boolean","title":"Managed By Superadmin"},"monthly_budget_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Eur"},"quota_max_vps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Vps"},"quota_max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Users"},"zitadel_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Org Id"},"archived":{"type":"boolean","title":"Archived"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","name","kind","color","logo_url","contact_email","contact_phone","address","managed_by_superadmin","monthly_budget_eur","quota_max_vps","quota_max_users","zitadel_org_id","archived","created_at","updated_at"],"title":"TenantOut"},"TenantPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":180,"minLength":1},{"type":"null"}],"title":"Name"},"kind":{"anyOf":[{"$ref":"#/components/schemas/TenantKind"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"managed_by_superadmin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Managed By Superadmin"},"monthly_budget_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Eur"},"quota_max_vps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quota Max Vps"},"quota_max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Quota Max Users"},"zitadel_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Org Id"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"TenantPatch"},"TenantRequestOut":{"properties":{"id":{"type":"integer","title":"Id"},"requester_email":{"type":"string","title":"Requester Email"},"requester_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester Name"},"zitadel_org_id":{"type":"string","title":"Zitadel Org Id"},"zitadel_org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Org Name"},"requested_name":{"type":"string","title":"Requested Name"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose"},"status":{"$ref":"#/components/schemas/TenantRequestStatus"},"created_tenant_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Tenant Id"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Note"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By"}},"type":"object","required":["id","requester_email","requester_name","zitadel_org_id","zitadel_org_name","requested_name","purpose","status","created_tenant_id","review_note","submitted_at","reviewed_at","reviewed_by"],"title":"TenantRequestOut"},"TenantRequestStatus":{"type":"string","enum":["pending","approved","rejected"],"title":"TenantRequestStatus"},"TenantStats":{"properties":{"hosts_count":{"type":"integer","title":"Hosts Count"},"users_count":{"type":"integer","title":"Users Count"},"monthly_cost_eur":{"type":"number","title":"Monthly Cost Eur"}},"type":"object","required":["hosts_count","users_count","monthly_cost_eur"],"title":"TenantStats"},"TenantWithStats":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"kind":{"$ref":"#/components/schemas/TenantKind"},"color":{"type":"string","title":"Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"managed_by_superadmin":{"type":"boolean","title":"Managed By Superadmin"},"monthly_budget_eur":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Eur"},"quota_max_vps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Vps"},"quota_max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quota Max Users"},"zitadel_org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zitadel Org Id"},"archived":{"type":"boolean","title":"Archived"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"stats":{"$ref":"#/components/schemas/TenantStats"}},"type":"object","required":["id","slug","name","kind","color","logo_url","contact_email","contact_phone","address","managed_by_superadmin","monthly_budget_eur","quota_max_vps","quota_max_users","zitadel_org_id","archived","created_at","updated_at","stats"],"title":"TenantWithStats"},"TestIn":{"properties":{"host_id":{"type":"integer","title":"Host Id"}},"type":"object","required":["host_id"],"title":"TestIn"},"TestKeyIn":{"properties":{"secret_key":{"type":"string","title":"Secret Key"}},"type":"object","required":["secret_key"],"title":"TestKeyIn"},"TokenCreated":{"properties":{"id":{"type":"integer","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"label":{"type":"string","title":"Label"},"scope":{"$ref":"#/components/schemas/ApiTokenScope"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked":{"type":"boolean","title":"Revoked"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"token":{"type":"string","title":"Token"}},"type":"object","required":["id","prefix","label","scope","expires_at","last_used_at","revoked","created_at","token"],"title":"TokenCreated","description":"Réponse spéciale à la création : inclut le `token` clair UNE FOIS."},"TokenIn":{"properties":{"label":{"type":"string","maxLength":120,"minLength":2,"title":"Label"},"scope":{"$ref":"#/components/schemas/ApiTokenScope","default":"read"},"expires_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Expires Days","default":90}},"type":"object","required":["label"],"title":"TokenIn"},"TokenOut":{"properties":{"id":{"type":"integer","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"label":{"type":"string","title":"Label"},"scope":{"$ref":"#/components/schemas/ApiTokenScope"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked":{"type":"boolean","title":"Revoked"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","prefix","label","scope","expires_at","last_used_at","revoked","created_at"],"title":"TokenOut"},"UserRole":{"type":"string","enum":["admin","viewer","superadmin","tenant_admin","tenant_viewer"],"title":"UserRole"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookIn":{"properties":{"label":{"type":"string","maxLength":120,"minLength":2,"title":"Label"},"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"},"transport":{"$ref":"#/components/schemas/WebhookTransport","default":"generic"},"event_filter":{"type":"string","title":"Event Filter","default":""},"min_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Severity"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["label","url"],"title":"WebhookIn"},"WebhookOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"label":{"type":"string","title":"Label"},"url":{"type":"string","title":"Url"},"transport":{"$ref":"#/components/schemas/WebhookTransport"},"event_filter":{"type":"string","title":"Event Filter"},"min_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Severity"},"enabled":{"type":"boolean","title":"Enabled"},"last_called_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Called At"},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","label","url","transport","event_filter","min_severity","enabled","last_called_at","last_status_code","consecutive_failures","created_by","created_at"],"title":"WebhookOut"},"WebhookPatch":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"transport":{"anyOf":[{"$ref":"#/components/schemas/WebhookTransport"},{"type":"null"}]},"event_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Filter"},"min_severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Severity"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"WebhookPatch"},"WebhookTransport":{"type":"string","enum":["generic","slack","discord","teams","pagerduty"],"title":"WebhookTransport"},"WorkflowIn":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":1,"title":"Slug"},"name":{"type":"string","maxLength":180,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"definition":{"type":"object","title":"Definition"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["slug","name","definition"],"title":"WorkflowIn"},"WorkflowOut":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"definition":{"type":"object","title":"Definition"},"enabled":{"type":"boolean","title":"Enabled"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"last_run_ok":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Last Run Ok"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"run_count":{"type":"integer","title":"Run Count"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","tenant_id","slug","name","description","definition","enabled","last_run_at","last_run_ok","last_error","run_count","created_by","created_at"],"title":"WorkflowOut"},"WorkflowPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"definition":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Definition"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"WorkflowPatch"}}}}