{"openapi":"3.1.0","info":{"title":"QAI Orchestrator API","description":"API para el orquestador QAI","version":"1.0.0"},"paths":{"/api/v1/scan":{"post":{"tags":["scan"],"summary":"Scan Repository","description":"Escanea un repositorio basado en su ID\n\nArgs:\n    request (ScanRequest): Request con el ID del repositorio a escanear\n    repository_scanner (RepositoryScanner): Scanner inyectado por dependencias\n    \nReturns:\n    ScanResponse: Resultado del escaneo\n    :param credentials:\n    :param repository_scanner:\n    :param scan_request:","operationId":"scan_repository_api_v1_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/scan-status":{"get":{"tags":["scan-status"],"summary":"Get Scan Status","operationId":"get_scan_status_api_v1_scan_status_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scan_id","in":"query","required":true,"schema":{"type":"string","description":"Scan ID","title":"Scan Id"},"description":"Scan ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys":{"get":{"tags":["api-key"],"summary":"Listar API keys del usuario","description":"Lista las API keys del usuario autenticado.\n\nCatálogo: fila con ``action IS NULL`` (solo paso por el enforcer de ruta\nregistrada); la autenticación la exige ``get_authenticated_user``. El listado\nen BD usa solo ``user_id`` del JWT.\n\n- **search**: Filtros separados por ;. Ej: is_revoked==true, expires_at=gte=1997-07-16T19:20:30+01:00\n- **sort**: Ordenación por repository_name, repository_url, expires_at, created_at, is_revoked, last_four.\n  Prefijo - para descendente. Ej: -expires_at,repository_name\n- **target_type**: ``repository``, ``connection`` o ``all`` (por defecto).","operationId":"get_api_keys_api_v1_api_keys_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["repository","connection","all"],"type":"string"},{"type":"null"}],"title":"Target Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyListItem"},"title":"Response Get Api Keys Api V1 Api Keys Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-key/mcp":{"post":{"tags":["api-key"],"summary":"Create Mcp Api Key","operationId":"create_mcp_api_key_api_v1_api_key_mcp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyMcpBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Mcp Api Key Api V1 Api Key Mcp Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/api-key/mcp/revoke":{"post":{"tags":["api-key"],"summary":"Revoke Mcp Api Key","description":"Revoca una API key MCP (autorización por recurso vía ``api_key_id`` en el body).","operationId":"revoke_mcp_api_key_api_v1_api_key_mcp_revoke_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiKeyMcpBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Revoke Mcp Api Key Api V1 Api Key Mcp Revoke Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/api-key/mcp/renew":{"post":{"tags":["api-key"],"summary":"Renew Mcp Api Key","description":"Renueva una API key MCP (misma política de autorización que revoke).","operationId":"renew_mcp_api_key_api_v1_api_key_mcp_renew_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiKeyMcpBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Renew Mcp Api Key Api V1 Api Key Mcp Renew Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/orgs/{org_id}/users/{user_id}/roles":{"post":{"tags":["org-user-roles"],"summary":"Assign a role to a user within an org","operationId":"assign_role_api_v1_orgs__org_id__users__user_id__roles_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignOrgUserRoleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedRoleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["org-user-roles"],"summary":"List role assignments for a user within an org","operationId":"list_roles_api_v1_orgs__org_id__users__user_id__roles_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRoleAssignmentListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/users/{user_id}/roles/{role_id}":{"delete":{"tags":["org-user-roles"],"summary":"Revoke a role assignment from a user within an org","operationId":"revoke_role_api_v1_orgs__org_id__users__user_id__roles__role_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/users":{"get":{"tags":["org-users"],"summary":"List distinct users in the organisation","description":"Return users who have at least one role assignment in the org.\n\nRequires org:view (org_owner, org_admin, org_observer). By default only\nuser_id and role names are returned. Pass ``include=name``, ``include=email``,\nor ``include=profile`` to fetch name and email from repo-inspector (one batch\ncall returns both fields).","operationId":"list_org_users_api_v1_orgs__org_id__users_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger repo-inspector profile lookup: name, email, or profile (all return name+email)","title":"Include"},"description":"Trigger repo-inspector profile lookup: name, email, or profile (all return name+email)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUserListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/users/{user_id}/roles":{"post":{"tags":["workspace-user-roles"],"summary":"Assign a role to a user within a workspace","operationId":"assign_workspace_role_api_v1_workspaces__workspace_id__users__user_id__roles_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignWorkspaceUserRoleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedWorkspaceRoleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/users/{user_id}/roles/{role_id}":{"delete":{"tags":["workspace-user-roles"],"summary":"Revoke a role assignment from a user within a workspace","operationId":"revoke_workspace_role_api_v1_workspaces__workspace_id__users__user_id__roles__role_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/workspaces-by-user":{"get":{"tags":["workspaces"],"summary":"List workspaces where the caller has explicit membership","operationId":"list_workspaces_by_user_api_v1_orgs_workspaces_by_user_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWorkspacesByUserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/orgs/workspaces":{"get":{"tags":["workspaces"],"summary":"List workspaces in an org (same visibility rules as /orgs/{org_id}/workspaces)","operationId":"list_org_workspaces_all_api_v1_orgs_workspaces_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"Keycloak organisation id (must appear in the JWT org_ids claim)","title":"Org Id"},"description":"Keycloak organisation id (must appear in the JWT org_ids claim)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/workspaces":{"get":{"tags":["workspaces"],"summary":"List workspaces accessible to the caller within an org","operationId":"list_workspaces_api_v1_orgs__org_id__workspaces_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workspaces"],"summary":"Create a workspace within an org","operationId":"create_workspace_api_v1_orgs__org_id__workspaces_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/workspaces/{workspace_id}":{"get":{"tags":["workspaces"],"summary":"Retrieve workspace details","operationId":"get_workspace_api_v1_orgs__org_id__workspaces__workspace_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["workspaces"],"summary":"Update workspace name","operationId":"update_workspace_api_v1_orgs__org_id__workspaces__workspace_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete a workspace (cascades user_roles; sets repositories.workspace_id to NULL)","operationId":"delete_workspace_api_v1_orgs__org_id__workspaces__workspace_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members":{"post":{"tags":["workspace-members"],"summary":"Add a user as a member of a workspace","operationId":"add_workspace_member_api_v1_workspaces__workspace_id__members_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWorkspaceMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedWorkspaceRoleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace-members"],"summary":"List all members of a workspace","operationId":"list_workspace_members_api_v1_workspaces__workspace_id__members_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members/{user_id}":{"delete":{"tags":["workspace-members"],"summary":"Remove a user from a workspace (all role assignments)","operationId":"remove_workspace_member_api_v1_workspaces__workspace_id__members__user_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/repositories/{repo_id}/workspace":{"put":{"tags":["repository-workspace"],"summary":"Assign a repository to a workspace","operationId":"assign_repository_to_workspace_api_v1_repositories__repo_id__workspace_put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRepositoryWorkspaceRequest"}}}},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["repository-workspace"],"summary":"Unassign a repository from its workspace","operationId":"unassign_repository_from_workspace_api_v1_repositories__repo_id__workspace_delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stack-profiles":{"post":{"tags":["stack-profiles-curated"],"summary":"Create a curated stack profile","operationId":"create_stack_profile_api_v1_stack_profiles_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStackProfileRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["stack-profiles-curated"],"summary":"List curated stack profiles by scope","operationId":"list_stack_profiles_api_v1_stack_profiles_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scope_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ScopeType"}},{"name":"scope_resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stack-profiles/{profile_id}":{"get":{"tags":["stack-profiles-curated"],"summary":"Retrieve a curated stack profile by id","operationId":"get_stack_profile_api_v1_stack_profiles__profile_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["stack-profiles-curated"],"summary":"Update a curated stack profile","operationId":"update_stack_profile_api_v1_stack_profiles__profile_id__patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStackProfileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["stack-profiles-curated"],"summary":"Delete a curated stack profile (cascades agent links)","operationId":"delete_stack_profile_api_v1_stack_profiles__profile_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stack-profiles/{profile_id}/agents":{"get":{"tags":["stack-profiles-curated"],"summary":"List agents attached to a stack profile","operationId":"list_agents_api_v1_stack_profiles__profile_id__agents_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales: targets, agent_features (coma-separados)","title":"Include"},"description":"Campos adicionales: targets, agent_features (coma-separados)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileAgentListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["stack-profiles-curated"],"summary":"Attach a tool (agent) to a stack profile","operationId":"attach_agent_api_v1_stack_profiles__profile_id__agents_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachAgentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileAgentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stack-profiles/{profile_id}/agents/{tool_id}":{"delete":{"tags":["stack-profiles-curated"],"summary":"Detach a tool (agent) from a stack profile","operationId":"detach_agent_api_v1_stack_profiles__profile_id__agents__tool_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks":{"get":{"tags":["tasks-dashboard"],"summary":"List tasks for the user's organisations","description":"RSQL `search`: required `status=in=(S1,S2)`; optional `repository_id==<id>`. Without `repository_id`, returns tasks for all orgs in the JWT (org-scoped and repo-linked tasks). With `repository_id`, restricts to that repo (still org-scoped). Sort: `sort=created_at` (asc) or `sort=-created_at` (desc, default). Pagination: `cursor` (opaque), `limit` (1–100).","operationId":"list_tasks_api_v1_tasks_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"search","in":"query","required":true,"schema":{"type":"string","description":"Example: status=in=(PENDING,QUEUED) or repository_id==repo-uuid;status=in=(PENDING)","title":"Search"},"description":"Example: status=in=(PENDING,QUEUED) or repository_id==repo-uuid;status=in=(PENDING)"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`created_at` ascending or `-created_at` descending (default if omitted)","title":"Sort"},"description":"`created_at` ascending or `-created_at` descending (default if omitted)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from previous response","title":"Cursor"},"description":"Opaque cursor from previous response"},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"description":"Page size (default 20, max 100)","title":"Limit"},"description":"Page size (default 20, max 100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedTasksResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections":{"post":{"tags":["connections"],"summary":"Create a standalone MCP connection","operationId":"create_connection_api_v1_connections_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"Keycloak organisation id; must appear in the JWT org_ids claim.","title":"Org Id"},"description":"Keycloak organisation id; must appear in the JWT org_ids claim."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["connections"],"summary":"List connections visible to the caller (JWT orgs)","operationId":"list_connections_api_v1_connections_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionResponse"},"title":"Response List Connections Api V1 Connections Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}}}},"/api/v1/connections/{connection_id}":{"get":{"tags":["connections"],"summary":"Connection detail with stack profile and API key metadata","operationId":"get_connection_api_v1_connections__connection_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionDetailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["connections"],"summary":"Update a connection","operationId":"update_connection_api_v1_connections__connection_id__patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["connections"],"summary":"Soft-delete connection and revoke its MCP API keys","operationId":"delete_connection_api_v1_connections__connection_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp-connections":{"get":{"tags":["mcp-connections"],"summary":"Unified MCP Connections screen listing","description":"Returns repositories and standalone connections in one shape (ADR-006 §13.5). Filter with RSQL subset: `search=type==all` (default), `search=type==repository`, or `search=type==connection`.","operationId":"list_mcp_connections_api_v1_mcp_connections_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","description":"Single predicate: type==all | type==repository | type==connection.","default":"type==all","title":"Search"},"description":"Single predicate: type==all | type==repository | type==connection."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpConnectionView"},"title":"Response List Mcp Connections Api V1 Mcp Connections Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/my-mcp-connections":{"get":{"tags":["my-mcp-connections"],"summary":"Listar todas las conexiones MCP del usuario (OAuth + API keys)","description":"Lista, en un único formato, las conexiones OAuth y las API keys del usuario autenticado.","operationId":"get_my_mcp_connections_api_v1_my_mcp_connections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MyMcpConnectionItem"},"type":"array","title":"Response Get My Mcp Connections Api V1 My Mcp Connections Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/my-mcp-connections/{connection_id}/revoke":{"post":{"tags":["my-mcp-connections"],"summary":"Revoke My Mcp Connection","description":"Revoca una conexión OAuth propia: borra la sesión de Keycloak y marca la fila revocada.\n\nLas API keys se revocan con el endpoint existente (``POST /api-key/mcp/revoke``),\nsin cambios.","operationId":"revoke_my_mcp_connection_api_v1_my_mcp_connections__connection_id__revoke_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke My Mcp Connection Api V1 My Mcp Connections  Connection Id  Revoke Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/repositories/{repository_id}/tasks/{task_id}/send-to-fix":{"post":{"tags":["tasks-dashboard"],"summary":"Queue autofix and launch Agent Runner","operationId":"send_task_to_fix_api_v1_repositories__repository_id__tasks__task_id__send_to_fix_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendToFixResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/quotas":{"get":{"tags":["org-quotas"],"summary":"List organisation quotas and tier defaults","operationId":"get_org_quotas_api_v1_orgs_quotas_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"Keycloak organisation id (must appear in the JWT org_ids claim)","title":"Org Id"},"description":"Keycloak organisation id (must appear in the JWT org_ids claim)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgQuotasResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/tools":{"get":{"tags":["org-tools"],"summary":"List an organisation's effective tool entitlements","operationId":"get_org_tools_api_v1_orgs_tools_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"Keycloak organisation id (must appear in the JWT org_ids claim)","title":"Org Id"},"description":"Keycloak organisation id (must appear in the JWT org_ids claim)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgToolsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/mcp-connections":{"get":{"tags":["org-mcp-connections"],"summary":"List an organisation's open MCP connections and shared connection-quota usage","operationId":"get_org_mcp_connections_api_v1_orgs_mcp_connections_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"query","required":true,"schema":{"type":"string","description":"Keycloak organisation id (must appear in the JWT org_ids claim)","title":"Org Id"},"description":"Keycloak organisation id (must appear in the JWT org_ids claim)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMcpConnectionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/stream":{"get":{"tags":["tasks"],"summary":"Real-time SSE stream of task lifecycle events for the authenticated org","description":"Long-lived Server-Sent Events stream per ADR-011 Option D.\n\n**Events**\n- `snapshot` — emitted once at connect; all PENDING tasks + last `completed_limit` COMPLETED tasks, ordered by `created_at DESC`.\n- `task-created` — new task row inserted.\n- `task-updated` — status, name, `input_payload`, `result_payload`, or `reopen_count` changed.\n- `task-resolved` — status flipped to `COMPLETED`.\n- `: keepalive` — comment line every 30 s of idle to keep proxies alive.\n\n**Termination**: close the connection from the client side. The server never sends a terminal event.","operationId":"get_tasks_stream_api_v1_tasks_stream_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"completed_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Cap on COMPLETED tasks in the initial snapshot. PENDING tasks are always included in full.","default":20,"title":"Completed Limit"},"description":"Cap on COMPLETED tasks in the initial snapshot. PENDING tasks are always included in full."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/billing/checkout-session":{"post":{"tags":["billing"],"summary":"Create a Stripe Checkout Session for a tier upgrade","operationId":"create_checkout_session_api_v1_orgs__org_id__billing_checkout_session_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/billing/portal":{"post":{"tags":["billing"],"summary":"Create a Stripe Billing Portal session for subscription management","operationId":"create_billing_portal_api_v1_orgs__org_id__billing_portal_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/billing/cancellation-link":{"post":{"tags":["billing"],"summary":"Create a Stripe Billing Portal session on the subscription-cancellation flow","operationId":"create_cancellation_link_api_v1_orgs__org_id__billing_cancellation_link_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/stripe":{"post":{"tags":["billing"],"summary":"Receive and process Stripe webhook events","operationId":"stripe_webhook_api_v1_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Api V1 Webhooks Stripe Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/tiers":{"get":{"tags":["tiers"],"summary":"List all available subscription tiers with their quota defaults","operationId":"list_tiers_api_v1_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TierResponse"},"type":"array","title":"Response List Tiers Api V1 Tiers Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/tiers/tools":{"get":{"tags":["tiers"],"summary":"List gated tools per tier (published paywall)","operationId":"list_tiers_tools_api_v1_tiers_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TierToolsResponse"},"type":"array","title":"Response List Tiers Tools Api V1 Tiers Tools Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/orgs/{org_id}/billing/team-upgrade-enquiry":{"post":{"tags":["billing"],"summary":"Submit a Team-tier upgrade enquiry","operationId":"submit_team_upgrade_enquiry_api_v1_orgs__org_id__billing_team_upgrade_enquiry_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpgradeEnquiryRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpgradeEnquiryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scan-schedules":{"post":{"tags":["scan-schedules"],"summary":"Create a scan schedule for a repository","operationId":"create_scan_schedule_api_v1_scan_schedules_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScanScheduleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanScheduleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["scan-schedules"],"summary":"List scan schedules for a repository","operationId":"list_scan_schedules_api_v1_scan_schedules_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"query","required":true,"schema":{"type":"string","description":"Repository ID","title":"Repository Id"},"description":"Repository ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScanScheduleResponse"},"title":"Response List Scan Schedules Api V1 Scan Schedules Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/scan-schedules/{id}":{"get":{"tags":["scan-schedules"],"summary":"Get a scan schedule by ID","operationId":"get_scan_schedule_api_v1_scan_schedules__id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanScheduleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["scan-schedules"],"summary":"Update timing for a scan schedule","operationId":"patch_scan_schedule_api_v1_scan_schedules__id__patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchScanScheduleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanScheduleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["scan-schedules"],"summary":"Delete a scan schedule","operationId":"delete_scan_schedule_api_v1_scan_schedules__id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}":{"delete":{"tags":["organisations"],"summary":"Permanently delete organisation (org_admin only)","operationId":"delete_organisation_api_v1_orgs__org_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDeleteNowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDeleteNowResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/onboarding":{"post":{"tags":["users"],"summary":"Persist first/last-touch UTM attribution for the current user","operationId":"submit_onboarding_api_v1_users_me_onboarding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/users/me/onboarding/complete":{"post":{"tags":["users"],"summary":"Mark onboarding complete for the current user (idempotent)","operationId":"complete_onboarding_api_v1_users_me_onboarding_complete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/users/me":{"get":{"tags":["users"],"summary":"Return the current user's profile","operationId":"get_current_user_me_api_v1_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/orgs/{org_id}/users/{user_id}":{"delete":{"tags":["users"],"summary":"Delete a user from the organisation (org_admin only)","description":"Delete a user from the organisation.\n\nRequires org_admin role. The user's data is removed from:\n- qai-orchestrator (user_roles)\n- repo-inspector (user row, memberships)\n- Keycloak (user account, if no other org memberships)\n\nThe user's workspaces and repositories REMAIN in the organisation.\n\nValidation:\n- org_admin cannot delete themselves\n- Cannot delete a user if it would leave the org with zero owners","operationId":"delete_user_api_v1_orgs__org_id__users__user_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/service/orgs/{keycloak_org_id}/member-capacity-check":{"post":{"tags":["service-invitations"],"summary":"Verify the org can add members before sending invitations","operationId":"check_member_capacity_api_v1_service_orgs__keycloak_org_id__member_capacity_check_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"keycloak_org_id","in":"path","required":true,"schema":{"type":"string","title":"Keycloak Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberCapacityCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberCapacityCheckResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/service/orgs/{keycloak_org_id}/users/{user_id}/invitation-owner-role":{"post":{"tags":["service-invitations"],"summary":"Assign org_owner to a user who accepted a same-org invitation","description":"Grant org_owner so the invitee sees all org workspaces like existing members.\n\nAuth: Keycloak client-credentials token (``ENGINE_CLIENT_ID`` / ``azp``).\nCalled by repo-inspector after Keycloak registration with a valid invitation.","operationId":"provision_invitation_org_owner_api_v1_service_orgs__keycloak_org_id__users__user_id__invitation_owner_role_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"keycloak_org_id","in":"path","required":true,"schema":{"type":"string","title":"Keycloak Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationOwnerRoleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/service/orgs/{keycloak_org_id}/personal-org-cleanup":{"post":{"tags":["service-organisations"],"summary":"Delete a leftover FREE single-member personal org after PRO invite accept","description":"Auth: Keycloak client-credentials token (``ENGINE_CLIENT_ID`` / ``azp``).","operationId":"cleanup_personal_org_api_v1_service_orgs__keycloak_org_id__personal_org_cleanup_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"keycloak_org_id","in":"path","required":true,"schema":{"type":"string","title":"Keycloak Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalOrgCleanupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalOrgCleanupResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/service/orgs/{keycloak_org_id}/personal-org-cleanup/preview":{"get":{"tags":["service-organisations"],"summary":"Report whether a FREE single-member personal org would be deleted","description":"Read-only. Auth: Keycloak client-credentials token (``ENGINE_CLIENT_ID`` / ``azp``).","operationId":"preview_personal_org_cleanup_api_v1_service_orgs__keycloak_org_id__personal_org_cleanup_preview_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"keycloak_org_id","in":"path","required":true,"schema":{"type":"string","title":"Keycloak Org Id"}},{"name":"owner_user_id","in":"query","required":true,"schema":{"type":"string","title":"Owner User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalOrgCleanupPreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/service/merge-checks":{"post":{"tags":["merge-checks"],"summary":"Trigger Merge Check","description":"Trigger a merge-check (DIFF) scan end-to-end. Returns 202 {scan_id}.","operationId":"trigger_merge_check_api_v1_service_merge_checks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeCheckTriggerBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Trigger Merge Check Api V1 Service Merge Checks Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/merge-checks":{"post":{"tags":["merge-checks"],"summary":"Request Merge Check","description":"Request a merge check. Returns 202 {scan_id}; the worker runs it async.","operationId":"request_merge_check_api_v1_merge_checks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeCheckTriggerBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Request Merge Check Api V1 Merge Checks Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/merge-checks/{scan_id}":{"get":{"tags":["merge-checks"],"summary":"Get Merge Check Status","description":"Merge-check scan status (lifecycle + per-step progress).","operationId":"get_merge_check_status_api_v1_merge_checks__scan_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Merge Check Status Api V1 Merge Checks  Scan Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/merge-checks/{scan_id}/issues":{"get":{"tags":["merge-checks"],"summary":"Get Merge Check Issues","description":"Merge-check findings, filterable by introduced_by_branch (D7).","operationId":"get_merge_check_issues_api_v1_merge_checks__scan_id__issues_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}},{"name":"introduced_by_branch","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by origin: true=introduced, false=pre-existing, omit=all","title":"Introduced By Branch"},"description":"Filter by origin: true=introduced, false=pre-existing, omit=all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Merge Check Issues Api V1 Merge Checks  Scan Id  Issues Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/merge-checks/{scan_id}/issues/{issue_id}/accept":{"post":{"tags":["merge-checks"],"summary":"Accept Merge Check Issue","description":"Mark a working-set finding ACCEPTED and append a durable decision (D2).","operationId":"accept_merge_check_issue_api_v1_merge_checks__scan_id__issues__issue_id__accept_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}},{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","title":"Issue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Accept Merge Check Issue Api V1 Merge Checks  Scan Id  Issues  Issue Id  Accept Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/merge-checks/{scan_id}/cleanup":{"post":{"tags":["merge-checks"],"summary":"Cleanup Merge Check Working Set","description":"Remove this branch's working set (merge/close). OPEN findings become ACCEPTED.","operationId":"cleanup_merge_check_working_set_api_v1_merge_checks__scan_id__cleanup_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","title":"Scan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanup Merge Check Working Set Api V1 Merge Checks  Scan Id  Cleanup Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/scan":{"post":{"tags":["scan-v2"],"summary":"Scan Repository V2","description":"Endpoint v2 para escanear un repositorio con validaciones de tools\n\nArgs:\n    body (ScanV2Body): Request con repository_id y tool_ids\n    authenticated_user (AuthenticatedUser): Usuario autenticado\n    tools_repo: Repositorio de tools\n    repositories_repo: Repositorio de repositorios\n    handler: Handler para procesar el scan v2\n    credentials: Credenciales de autorización\n    \nReturns:\n    dict: Respuesta de éxito o error","operationId":"scan_repository_v2_api_v2_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanV2Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Scan Repository V2 Api V2 Scan Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v2/scan-status/{scan_id}":{"get":{"tags":["scan-status-v2"],"summary":"Get Scan Status V2","description":"Endpoint v2 para obtener el estado de un scan mediante Server Sent Events\n\nArgs:\n    scan_id: ID del scan a monitorear\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar el scan status v2\n    credentials: Credenciales de autorización\n    \nReturns:\n    StreamingResponse: Stream de eventos SSE con el estado del scan","operationId":"get_scan_status_v2_api_v2_scan_status__scan_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scan_id","in":"path","required":true,"schema":{"type":"string","description":"Scan ID","title":"Scan Id"},"description":"Scan ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/test-auto-discovery":{"post":{"tags":["test-auto-discovery"],"summary":"Test Auto Discovery","description":"Endpoint para testear la funcionalidad de auto-discovery con GitRepositoryDownloader\n\nArgs:\n    body (TestAutoDiscoveryRequest): Request con todos los parámetros necesarios\n    authenticated_user (AuthenticatedUser): Usuario autenticado\n    handler: Handler para procesar el test de auto-discovery\n    credentials: Credenciales de autorización\n    \nReturns:\n    dict: Respuesta de éxito o error","operationId":"test_auto_discovery_api_v2_test_auto_discovery_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestAutoDiscoveryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Test Auto Discovery Api V2 Test Auto Discovery Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v2/tool-builder-status/{tool_id}":{"get":{"tags":["tool-builder-status"],"summary":"Get Tool Builder Status","description":"Stream tool-builder execution progress as Server-Sent Events.\n\nReturns a continuous SSE stream reporting process-level progress until the\nbuild pipeline finishes (event: tool_builder_finished) or an error occurs.","operationId":"get_tool_builder_status_api_v2_tool_builder_status__tool_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","description":"Tool ID to stream build progress for","title":"Tool Id"},"description":"Tool ID to stream build progress for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/autodiscovery-status/{repository_id}/summary":{"get":{"tags":["autodiscovery-status"],"summary":"Get Autodiscovery Status Summary","description":"Status of the latest autodiscovery execution, as one JSON snapshot.\n\n``status`` is NOT_FOUND (no execution recorded yet), RUNNING, SUCCESS or\nFAIL. SUCCESS means the stack targets are linked and their rulesets\nattached, so a client that polls the targets can stop (QSA-1910).","operationId":"get_autodiscovery_status_summary_api_v2_autodiscovery_status__repository_id__summary_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","description":"Repository ID whose latest autodiscovery execution to report","title":"Repository Id"},"description":"Repository ID whose latest autodiscovery execution to report"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutodiscoveryStatusSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/autodiscovery-status/{repository_id}":{"get":{"tags":["autodiscovery-status"],"summary":"Get Autodiscovery Status","description":"Stream autodiscovery execution progress as Server-Sent Events.\n\nReturns a continuous SSE stream reporting process-level progress until the\nautodiscovery pipeline finishes (event: autodiscovery_finished) or an error occurs.\nUses the latest execution_id for the given repository_id.","operationId":"get_autodiscovery_status_api_v2_autodiscovery_status__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","description":"Repository ID to stream autodiscovery progress for","title":"Repository Id"},"description":"Repository ID to stream autodiscovery progress for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/scan":{"post":{"tags":["scan-v3"],"summary":"Scan Repository V3","description":"Endpoint v3 para escanear un repositorio con validaciones de tools\n\nArgs:\n    body (ScanV3Body): Request con repository_id y tool_ids\n    authenticated_user (AuthenticatedUser): Usuario autenticado\n    tools_repo: Repositorio de tools\n    repositories_repo: Repositorio de repositorios\n    handler: Handler para procesar el scan v3\n    credentials: Credenciales de autorización\n    \nReturns:\n    ScanV3Response: el scan creado (status, message, repository_id, tool_ids, scan_id)","operationId":"scan_repository_v3_api_v3_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanV3Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanV3Response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/admin/endpoint-permissions":{"get":{"tags":["admin"],"summary":"List endpoint permissions (admin)","description":"Returns endpoint_permissions rows with pagination, optionally filtered by module, is_active, and action (req 1). Each item includes updated_at for optimistic concurrency checking in the UI.","operationId":"list_endpoint_permissions_admin_endpoint_permissions_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EndpointModule"},{"type":"null"}],"description":"Filter by API module (orchestrator, tools, rules, issues, public).","title":"Module"},"description":"Filter by API module (orchestrator, tools, rules, issues, public)."},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active/inactive status.","title":"Is Active"},"description":"Filter by active/inactive status."},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact-match filter on the action column (e.g. 'repo:view').","title":"Action"},"description":"Exact-match filter on the action column (e.g. 'repo:view')."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointPermissionListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/endpoint-permissions/{permission_id}":{"put":{"tags":["admin"],"summary":"Update an endpoint permission (admin)","description":"Updates action, resource_extractor, is_active, and description (req 2). Returns 400 when resource_extractor is not a valid strategy string. Supply expected_updated_at to enable optimistic concurrency checking; a 409 is returned when the row has been modified since last fetched.","operationId":"update_endpoint_permission_admin_endpoint_permissions__permission_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"permission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Permission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEndpointPermissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointPermissionAdminResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/role-permissions":{"get":{"tags":["admin"],"summary":"List role permissions (admin)","description":"Returns role_permissions rows with pagination and optional filters (req 3).","operationId":"list_role_permissions_admin_role_permissions_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"role_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact-match filter on role_name.","title":"Role Name"},"description":"Exact-match filter on role_name."},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact-match filter on action.","title":"Action"},"description":"Exact-match filter on action."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolePermissionListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Add a role-action grant (admin)","description":"Inserts a new role-action grant (req 5). Returns 409 when the (role_name, action) pair already exists.","operationId":"create_role_permission_admin_role_permissions_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRolePermissionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolePermissionAdminResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/role-permissions/{role_permission_id}":{"put":{"tags":["admin"],"summary":"Update a role-action grant (admin)","description":"Toggles is_active or updates description for an existing grant (req 4). Cache is invalidated immediately after update (req 7).","operationId":"update_role_permission_admin_role_permissions__role_permission_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"role_permission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Permission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRolePermissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolePermissionAdminResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tiers/change":{"post":{"tags":["admin"],"summary":"Manually change an organisation's tier (admin)","description":"Moves one organisation to a target tier with full entitlements (tier + quotas + gated tools), sets tier_source to 'manual', and is idempotent for a no-op change. Requires the Keycloak 'admins' group.","operationId":"change_tier_admin_tiers_change_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierChangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierChangeResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/admin/tiers":{"get":{"tags":["admin"],"summary":"List the whole tier catalogue (admin)","description":"Every tier in rank order, retired ones included, with the Stripe identifiers and the number of organisations currently on each tier. Requires the Keycloak 'admins' group.","operationId":"list_tiers_admin_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminTierResponse"},"type":"array","title":"Response List Tiers Admin Tiers Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]},"post":{"tags":["admin"],"summary":"Create a tier (admin)","description":"Adds a tier to the catalogue. The tier is created retired: configure its quotas, then activate it. Requires the Keycloak 'admins' group.","operationId":"create_tier_admin_tiers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/admin/tiers/{code}":{"patch":{"tags":["admin"],"summary":"Update a tier (admin)","description":"Changes the fields present in the body. The tier code is immutable. Requires the Keycloak 'admins' group.","operationId":"update_tier_admin_tiers__code__patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tiers/{code}/status":{"patch":{"tags":["admin"],"summary":"Retire a tier or bring it back (admin)","description":"Retiring a tier stops it being offered for checkout or for a manual tier change. The organisations already on it keep their tier, quotas and gated tools. The reserved codes 'free' and 'internal' cannot be retired. Requires the Keycloak 'admins' group.","operationId":"set_tier_status_admin_tiers__code__status_patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tiers/{code}/quotas":{"put":{"tags":["admin"],"summary":"Replace the quota template of a tier (admin)","description":"Replaces the whole quota set: a key that is absent from the body is removed from the tier. The organisations already on the tier keep their current quotas; the template applies on their next tier change. Requires the Keycloak 'admins' group.","operationId":"set_tier_quotas_admin_tiers__code__quotas_put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierQuotasRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTierQuotaResponse"},"title":"Response Set Tier Quotas Admin Tiers  Code  Quotas Put"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tiers/{code}/quotas/copy-from/{source_code}":{"post":{"tags":["admin"],"summary":"Copy another tier's quota template (admin)","description":"Replaces this tier's quotas with a copy of the source tier's, as a starting point to edit. Requires the Keycloak 'admins' group.","operationId":"copy_tier_quotas_admin_tiers__code__quotas_copy_from__source_code__post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}},{"name":"source_code","in":"path","required":true,"schema":{"type":"string","title":"Source Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTierQuotaResponse"},"title":"Response Copy Tier Quotas Admin Tiers  Code  Quotas Copy From  Source Code  Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/tiers/{code}/tools":{"put":{"tags":["admin"],"summary":"Replace the gated-tool template of a tier (admin)","description":"Replaces the whole gated-tool set: a tool absent from the body is no longer templated for the tier. Requires the Keycloak 'admins' group.","operationId":"set_tier_tools_admin_tiers__code__tools_put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTierToolsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTierToolResponse"},"title":"Response Set Tier Tools Admin Tiers  Code  Tools Put"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rule/build":{"post":{"summary":"Build Rule With Llm","description":"Genera una regla con LLM, la persiste y ejecuta un scan de la tool con rule_id.","operationId":"build_rule_with_llm_rules_v1_rule_build_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"allow_demo","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Allow Demo"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildRuleBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildRuleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rule/rebuild":{"post":{"summary":"Rebuild Rule With Llm","description":"Deletes the rule (cascade), then recreates it with LLM using the same name and resolved tool.","operationId":"rebuild_rule_with_llm_rules_v1_rule_rebuild_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"allow_demo","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Allow Demo"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebuildRuleBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildRuleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rule/{rule_id}":{"delete":{"summary":"Delete Rule","description":"Deletes a rule, its issues, tool/ruleset links, and rule payload rows (cascade).","operationId":"delete_rule_rules_v1_rule__rule_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rule/regex":{"post":{"summary":"Create Regex Rule","description":"Endpoint para crear una regla de tipo regex.","operationId":"create_regex_rule_rules_v1_rule_regex_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegexRuleInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegexRuleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/rule/external-tool":{"post":{"summary":"Create External Tool Rule","description":"Endpoint para crear una regla de tipo external_tool.","operationId":"create_external_tool_rule_rules_v1_rule_external_tool_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalToolRuleInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalToolRuleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/rule/external-tool/batch":{"post":{"summary":"Create External Tool Rules Batch","description":"Endpoint para crear múltiples reglas external-tool en batch.\n\nProcesa cada regla independientemente con partial success:\n- Reglas válidas: se crean (status=created)\n- Reglas duplicadas: se marcan como ya existentes (status=already_exists)\n- Reglas inválidas: se marcan como fallidas con detalle del error (status=failed)\n\nPerformance:\n- 1 HTTP request → 1 conexión DB\n- N commits secuenciales dentro de la misma sesión\n- No sobrecarga el pool de conexiones\n\nReturns:\n    HTTP 200 con resultados detallados (siempre retorna 200, errores en body)","operationId":"create_external_tool_rules_batch_rules_v1_rule_external_tool_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalToolRulesBatchInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalToolRulesBatchResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/rule/xpath":{"post":{"summary":"Create Xpath Rule","description":"Endpoint para crear una regla de tipo xpath.","operationId":"create_xpath_rule_rules_v1_rule_xpath_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/XpathRuleInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XpathRuleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/rule/prompt":{"post":{"summary":"Create Prompt Rule","description":"Endpoint para crear una regla de tipo prompt (juicio, evaluada por el agente).\n\nEl payload es el prompt de la regla en markdown y se almacena en llm_rules;\nrules.rule_type queda como 'prompt'. Un ruleset no puede mezclar reglas prompt\ncon reglas de otro tipo, así que asociarla a un ruleset determinista se rechaza.","operationId":"create_prompt_rule_rules_v1_rule_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRuleInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRuleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/rules/by-repository/{repository_id}":{"get":{"summary":"Get Rules By Repository","description":"Endpoint para obtener reglas por repository agrupadas por tipo.\n\nRequiere token del engine (mismo validador que external tool rules).","operationId":"get_rules_by_repository_rules_v1_rules_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","title":"Repository Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RulesGroupResponse"},"title":"Response Get Rules By Repository Rules V1 Rules By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/ai-hub-client/rules/for-tool/{tool_id}":{"get":{"summary":"Get Rules For Tool","description":"Endpoint para obtener reglas asociadas a un tool específico.\n\nArgs:\n    tool_id: ID del tool\n\nReturns:\n    Lista de reglas asociadas al tool\n\nRequiere token del engine (mismo validador que external tool rules).","operationId":"get_rules_for_tool_rules_v1_ai_hub_client_rules_for_tool__tool_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleItemResponse"},"title":"Response Get Rules For Tool Rules V1 Ai Hub Client Rules For Tool  Tool Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/for-tool/{tool_id}":{"get":{"summary":"Get Rules For Tool","description":"Endpoint para obtener reglas asociadas a un tool específico.\n\nArgs:\n    tool_id: ID del tool\n    \nReturns:\n    Lista de reglas asociadas al tool\n    \nRequiere token del engine (mismo validador que external tool rules).","operationId":"get_rules_for_tool_rules_v1_rules_for_tool__tool_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleItemResponse"},"title":"Response Get Rules For Tool Rules V1 Rules For Tool  Tool Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/ruleset/by-tool/{tool_id}":{"get":{"summary":"Get Rulesets By Tool","description":"Endpoint para obtener rulesets asociados a un tool específico.\n\nArgs:\n    tool_id: ID del tool\n    \nReturns:\n    Lista de rulesets asociados al tool.\n    Lista vacía si no hay rulesets asociados.\n    \nRequiere token del engine (mismo validador que external tool rules).","operationId":"get_rulesets_by_tool_rules_v1_ruleset_by_tool__tool_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RulesetVersionResponse"},"title":"Response Get Rulesets By Tool Rules V1 Ruleset By Tool  Tool Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/ruleset":{"post":{"summary":"Create Ruleset","description":"Endpoint para crear un nuevo ruleset.\n\nArgs:\n    body: Datos del ruleset a crear\n        - ruleset_version_id: ID único del ruleset\n        - name: Nombre del ruleset\n        - launch_date: Fecha de lanzamiento (YYYY-MM-DD)\n        - tool_id: ID del tool asociado (debe existir)\n\nReturns:\n    RulesetVersionResponse con los datos del ruleset creado (HTTP 201)\n    \nRaises:\n    HTTPException 422: Si hay errores de validación\n        - tool_id no existe\n        - ruleset_version_id ya existe\n        - datos inválidos\n    \nRequiere token del engine (mismo validador que external tool rules).","operationId":"create_ruleset_rules_v1_ruleset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRulesetInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesetVersionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/assign-rules-to-ruleset":{"post":{"summary":"Assign Rules To Ruleset","description":"Endpoint para asignar reglas a un ruleset.\n\nArgs:\n    body: Datos de la asignación\n        - ruleset_version_id: ID del ruleset (debe existir)\n        - rules_ids: Lista de IDs de reglas (deben existir)\n\nReturns:\n    Dict con mensaje de éxito y detalles de la asignación (HTTP 201)\n    \nRaises:\n    HTTPException 422: Si hay errores de validación\n        - ruleset_version_id no existe\n        - alguno de los rules_ids no existe\n        - lista de rules_ids vacía\n    \nRequiere token del engine (mismo validador que external tool rules).","operationId":"assign_rules_to_ruleset_rules_v1_assign_rules_to_ruleset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRulesToRulesetInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/rules/v1/rules/common-data/by-repository/{repository_id}":{"get":{"summary":"Get Rules Common Data By Repository","description":"Lista reglas de un repositorio con filtrado, sorting y paginación.","operationId":"get_rules_common_data_by_repository_rules_v1_rules_common_data_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales: issues_metadata, rule_details, rule_payload","title":"Include"},"description":"Campos adicionales: issues_metadata, rule_details, rule_payload"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL. Filtros: severity_id, impact_area_id, module, tool_id, text_query, standard_code. Ejemplo: ?search=severity_id==HIGH;text_query==\"SQL injection\"","title":"Search"},"description":"Filtro RSQL. Filtros: severity_id, impact_area_id, module, tool_id, text_query, standard_code. Ejemplo: ?search=severity_id==HIGH;text_query==\"SQL injection\""},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ordenación. Campos: rule.severity, rule.impact_area, rule.name, num_issues, sum_time_to_fix. Ejemplo: ?sort=-rule.severity,rule.name","title":"Sort"},"description":"Ordenación. Campos: rule.severity, rule.impact_area, rule.name, num_issues, sum_time_to_fix. Ejemplo: ?sort=-rule.severity,rule.name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedRulesCommonDataResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/full-scan/common-data/by-repository/{repository_id}":{"get":{"summary":"Get Rules Full Scan Common Data By Repository","description":"Lista reglas de un repositorio (solo issues full_scan) con filtrado, sorting y paginación.","operationId":"get_rules_full_scan_common_data_by_repository_rules_v1_rules_full_scan_common_data_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales: issues_metadata, rule_details, rule_payload","title":"Include"},"description":"Campos adicionales: issues_metadata, rule_details, rule_payload"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL. Filtros: severity_id, impact_area_id, module, tool_id, text_query, standard_code. Ejemplo: ?search=severity_id==HIGH;text_query==\"SQL injection\"","title":"Search"},"description":"Filtro RSQL. Filtros: severity_id, impact_area_id, module, tool_id, text_query, standard_code. Ejemplo: ?search=severity_id==HIGH;text_query==\"SQL injection\""},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ordenación. Campos: rule.severity, rule.impact_area, rule.name, num_issues, sum_time_to_fix. Ejemplo: ?sort=-rule.severity,rule.name","title":"Sort"},"description":"Ordenación. Campos: rule.severity, rule.impact_area, rule.name, num_issues, sum_time_to_fix. Ejemplo: ?sort=-rule.severity,rule.name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedRulesCommonDataResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/llm/common-data/by-repository/{repository_id}":{"get":{"summary":"Get Rules Llm Common Data By Repository","description":"Lista reglas con issues evaluados por LLM (solo llm_issues); num_issues cuenta LLM.","operationId":"get_rules_llm_common_data_by_repository_rules_v1_rules_llm_common_data_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales: issues_metadata, rule_details, rule_payload","title":"Include"},"description":"Campos adicionales: issues_metadata, rule_details, rule_payload"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL. Filtros: severity_id, impact_area_id, module, tool_id, text_query, standard_code.","title":"Search"},"description":"Filtro RSQL. Filtros: severity_id, impact_area_id, module, tool_id, text_query, standard_code."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ordenación. Campos: rule.severity, rule.impact_area, rule.name, num_issues, sum_time_to_fix.","title":"Sort"},"description":"Ordenación. Campos: rule.severity, rule.impact_area, rule.name, num_issues, sum_time_to_fix."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedRulesCommonDataResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/common-data/count/by-repository/{repository_id}":{"get":{"summary":"Contar rules de un repositorio","description":"Devuelve el total de rules con issues según filtros RSQL. Mismos filtros que GET /rules/common-data/by-repository.","operationId":"count_rules_by_repository_rules_v1_rules_common_data_count_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL (mismos que GET /rules/common-data/by-repository).\n\nFiltros disponibles:\n- severity_id: ID de severidad (HIGH, MEDIUM, LOW)\n- impact_area_id: Área de impacto (security, performance, manageability, scalability)\n- tool_id: ID de la herramienta\n- text_query: Búsqueda de texto en nombre, descripción, impact, action\n- standard_code: Código del estándar de cumplimiento de la regla (ej: ISO27001)\n\nEjemplos:\n- ?search=severity_id==HIGH\n- ?search=impact_area_id==security\n- ?search=severity_id==HIGH;text_query==\"SQL injection\"","title":"Search"},"description":"Filtro RSQL (mismos que GET /rules/common-data/by-repository).\n\nFiltros disponibles:\n- severity_id: ID de severidad (HIGH, MEDIUM, LOW)\n- impact_area_id: Área de impacto (security, performance, manageability, scalability)\n- tool_id: ID de la herramienta\n- text_query: Búsqueda de texto en nombre, descripción, impact, action\n- standard_code: Código del estándar de cumplimiento de la regla (ej: ISO27001)\n\nEjemplos:\n- ?search=severity_id==HIGH\n- ?search=impact_area_id==security\n- ?search=severity_id==HIGH;text_query==\"SQL injection\""}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountRulesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/full-scan/common-data/count/by-repository/{repository_id}":{"get":{"summary":"Contar rules full-scan de un repositorio","description":"Devuelve el total de rules con issues full_scan según filtros RSQL.","operationId":"count_rules_full_scan_by_repository_rules_v1_rules_full_scan_common_data_count_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL (mismos que GET /rules/common-data/by-repository).","title":"Search"},"description":"Filtro RSQL (mismos que GET /rules/common-data/by-repository)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountRulesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/llm/common-data/count/by-repository/{repository_id}":{"get":{"summary":"Contar rules con issues LLM de un repositorio","description":"Devuelve el total de rules con issues evaluados por LLM (solo llm_issues) según filtros RSQL.","operationId":"count_rules_llm_by_repository_rules_v1_rules_llm_common_data_count_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL (mismos que GET /rules/common-data/by-repository).","title":"Search"},"description":"Filtro RSQL (mismos que GET /rules/common-data/by-repository)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountRulesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/common-data/filters/by-repository/{repository_id}":{"get":{"summary":"Get Rules Filters By Repository","description":"Obtiene los filtros disponibles para rules con issues en un repositorio.\n\nSi se proporciona el parámetro search, filtra los valores de filtros\nsegún los criterios RSQL especificados.\n\nRetorna una lista de filtros con sus valores únicos disponibles,\nen formato estándar para cada filtro.\n\nFormato de respuesta:\n[\n    {\n        \"id\": \"severity\",\n        \"name\": \"Severities\",\n        \"total\": 3,\n        \"items\": [{\"key\": \"HIGH\", \"value\": \"High\"}, ...]\n    },\n    {\n        \"id\": \"impact_area\",\n        \"name\": \"Impact Areas\",\n        \"total\": 2,\n        \"items\": [{\"key\": \"security\", \"value\": \"Security\"}, ...]\n    },\n    {\n        \"id\": \"tool\",\n        \"name\": \"Tools\",\n        \"total\": 2,\n        \"items\": [{\"key\": \"phpstan-1.0\", \"value\": \"PHPStan\"}, ...]\n    }\n]","operationId":"get_rules_filters_by_repository_rules_v1_rules_common_data_filters_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL opcional para filtrar valores de filtros (ej: tool_id==abc123)","title":"Search"},"description":"Filtro RSQL opcional para filtrar valores de filtros (ej: tool_id==abc123)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Get Rules Filters By Repository Rules V1 Rules Common Data Filters By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/full-scan/common-data/filters/by-repository/{repository_id}":{"get":{"summary":"Get Rules Full Scan Filters By Repository","description":"Obtiene los filtros disponibles para rules con issues full_scan en un repositorio.","operationId":"get_rules_full_scan_filters_by_repository_rules_v1_rules_full_scan_common_data_filters_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL opcional para filtrar valores de filtros (ej: tool_id==abc123)","title":"Search"},"description":"Filtro RSQL opcional para filtrar valores de filtros (ej: tool_id==abc123)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Get Rules Full Scan Filters By Repository Rules V1 Rules Full Scan Common Data Filters By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/v1/rules/llm/common-data/filters/by-repository/{repository_id}":{"get":{"summary":"Get Rules Llm Filters By Repository","description":"Obtiene los filtros disponibles para rules con issues LLM (solo llm_issues) en un repositorio.","operationId":"get_rules_llm_filters_by_repository_rules_v1_rules_llm_common_data_filters_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL opcional para filtrar valores de filtros (ej: tool_id==abc123)","title":"Search"},"description":"Filtro RSQL opcional para filtrar valores de filtros (ej: tool_id==abc123)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Get Rules Llm Filters By Repository Rules V1 Rules Llm Common Data Filters By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/by-repository/{repository_id}":{"get":{"summary":"Get Issues By Repository","description":"Lista issues del repositorio con paginación por cursor (severity order, issue id, scanned element id).\ndirection: next (default), prev, last.","operationId":"get_issues_by_repository_issues_v1_issues_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales a incluir (ej: tools)","title":"Include"},"description":"Campos adicionales a incluir (ej: tools)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro de búsqueda RSQL. Operador soportado: == (equal).\n\nFiltros disponibles:\n- tool_id: ID de la herramienta\n- rule_id: ID de la regla\n- module: Nombre del módulo\n- severity_id: ID de severidad (HIGH, MEDIUM, LOW)\n- impact_area_id: Área de impacto (security, performance, manageability, scalability)\n- text_query: Búsqueda de texto en múltiples campos (description, impact, action, rule.*, file_path)\n- standard_code: Código del estándar de cumplimiento de la regla (ej: ISO27001)\n\nNota: Para valores con espacios o caracteres especiales (/, @, #, etc.), usar comillas:\n  text_query==\"direct access\" (espacios)\n  text_query==\"Component/Listing\" (file paths con /)\n\nEjemplos:\n- ?search=severity_id==HIGH\n- ?search=impact_area_id==security\n- ?search=text_query==authentication\n- ?search=text_query==\"direct access\" (con espacios)\n- ?search=severity_id==HIGH;text_query==\"SQL injection\" (combinar con ;)","title":"Search"},"description":"Filtro de búsqueda RSQL. Operador soportado: == (equal).\n\nFiltros disponibles:\n- tool_id: ID de la herramienta\n- rule_id: ID de la regla\n- module: Nombre del módulo\n- severity_id: ID de severidad (HIGH, MEDIUM, LOW)\n- impact_area_id: Área de impacto (security, performance, manageability, scalability)\n- text_query: Búsqueda de texto en múltiples campos (description, impact, action, rule.*, file_path)\n- standard_code: Código del estándar de cumplimiento de la regla (ej: ISO27001)\n\nNota: Para valores con espacios o caracteres especiales (/, @, #, etc.), usar comillas:\n  text_query==\"direct access\" (espacios)\n  text_query==\"Component/Listing\" (file paths con /)\n\nEjemplos:\n- ?search=severity_id==HIGH\n- ?search=impact_area_id==security\n- ?search=text_query==authentication\n- ?search=text_query==\"direct access\" (con espacios)\n- ?search=severity_id==HIGH;text_query==\"SQL injection\" (combinar con ;)"},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campo(s) de ordenación (ej: -rule.severity,line_number)","title":"Sort"},"description":"Campo(s) de ordenación (ej: -rule.severity,line_number)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/full-scan/by-repository/{repository_id}":{"get":{"summary":"Get Issues Full Scan By Repository","description":"Lista issues del repositorio (solo full_scan) con paginación por cursor.","operationId":"get_issues_full_scan_by_repository_issues_v1_issues_full_scan_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales a incluir (ej: tools)","title":"Include"},"description":"Campos adicionales a incluir (ej: tools)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro de búsqueda RSQL. Operador soportado: == (equal).\n\nFiltros disponibles: tool_id, rule_id, module, severity_id, impact_area_id, text_query, standard_code.","title":"Search"},"description":"Filtro de búsqueda RSQL. Operador soportado: == (equal).\n\nFiltros disponibles: tool_id, rule_id, module, severity_id, impact_area_id, text_query, standard_code."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campo(s) de ordenación (ej: -rule.severity,line_number)","title":"Sort"},"description":"Campo(s) de ordenación (ej: -rule.severity,line_number)"},{"name":"files","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Lista exacta de file_path a incluir (repetir el parámetro). Usado por get_open_issues (QSA-1296).","title":"Files"},"description":"Lista exacta de file_path a incluir (repetir el parámetro). Usado por get_open_issues (QSA-1296)."},{"name":"latest_completed_scan_only","in":"query","required":false,"schema":{"type":"boolean","description":"Solo issues del último full scan completado del repositorio (SUCCESS/PARTIAL). Usado por get_open_issues.","default":false,"title":"Latest Completed Scan Only"},"description":"Solo issues del último full scan completado del repositorio (SUCCESS/PARTIAL). Usado por get_open_issues."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/llm/by-repository/{repository_id}":{"get":{"summary":"Get Issues Llm By Repository","description":"Lista issues evaluados por LLM del repositorio (solo llm_issues) con paginación por cursor.","operationId":"get_issues_llm_by_repository_issues_v1_issues_llm_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales a incluir (ej: tools)","title":"Include"},"description":"Campos adicionales a incluir (ej: tools)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro de búsqueda RSQL. Operador soportado: == (equal).\n\nFiltros disponibles: tool_id, rule_id, module, severity_id, impact_area_id, text_query, standard_code.","title":"Search"},"description":"Filtro de búsqueda RSQL. Operador soportado: == (equal).\n\nFiltros disponibles: tool_id, rule_id, module, severity_id, impact_area_id, text_query, standard_code."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campo(s) de ordenación (ej: -rule.severity,line_number)","title":"Sort"},"description":"Campo(s) de ordenación (ej: -rule.severity,line_number)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedLlmIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/count/by-repository/{repository_id}":{"get":{"summary":"Contar issues de un repositorio","description":"Devuelve el total de issues del repositorio según filtros RSQL. Soporta los mismos filtros que GET /issues/by-repository.","operationId":"count_issues_by_repository_issues_v1_issues_count_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro de búsqueda RSQL (mismos filtros que GET /issues/by-repository).\n\nFiltros disponibles:\n- tool_id: ID de la herramienta\n- rule_id: ID de la regla\n- module: Nombre del módulo\n- severity_id: ID de severidad (HIGH, MEDIUM, LOW)\n- impact_area_id: Área de impacto (security, performance, manageability, scalability)\n- text_query: Búsqueda de texto en múltiples campos\n- standard_code: Código del estándar de cumplimiento de la regla (ej: ISO27001)\n\nEjemplos:\n- ?search=severity_id==HIGH\n- ?search=impact_area_id==security\n- ?search=severity_id==HIGH;text_query==\"SQL injection\"","title":"Search"},"description":"Filtro de búsqueda RSQL (mismos filtros que GET /issues/by-repository).\n\nFiltros disponibles:\n- tool_id: ID de la herramienta\n- rule_id: ID de la regla\n- module: Nombre del módulo\n- severity_id: ID de severidad (HIGH, MEDIUM, LOW)\n- impact_area_id: Área de impacto (security, performance, manageability, scalability)\n- text_query: Búsqueda de texto en múltiples campos\n- standard_code: Código del estándar de cumplimiento de la regla (ej: ISO27001)\n\nEjemplos:\n- ?search=severity_id==HIGH\n- ?search=impact_area_id==security\n- ?search=severity_id==HIGH;text_query==\"SQL injection\""}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/full-scan/count/by-repository/{repository_id}":{"get":{"summary":"Contar issues full-scan de un repositorio","description":"Devuelve el total de issues full_scan del repositorio según filtros RSQL.","operationId":"count_issues_full_scan_by_repository_issues_v1_issues_full_scan_count_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL (mismos filtros que GET /issues/by-repository).","title":"Search"},"description":"Filtro RSQL (mismos filtros que GET /issues/by-repository)."},{"name":"files","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Lista exacta de file_path a incluir (repetir el parámetro). Usado por get_open_issues (QSA-1296).","title":"Files"},"description":"Lista exacta de file_path a incluir (repetir el parámetro). Usado por get_open_issues (QSA-1296)."},{"name":"latest_completed_scan_only","in":"query","required":false,"schema":{"type":"boolean","description":"Solo issues del último full scan completado del repositorio (SUCCESS/PARTIAL). Usado por get_open_issues.","default":false,"title":"Latest Completed Scan Only"},"description":"Solo issues del último full scan completado del repositorio (SUCCESS/PARTIAL). Usado por get_open_issues."},{"name":"include_severity_impact_breakdown","in":"query","required":false,"schema":{"type":"boolean","description":"Incluye by_severity_and_impact_area, el desglose de conteos por severity+impact_area. Usado por get_open_issues (QSA-1539) para reportar qué quedó fuera del top-N.","default":false,"title":"Include Severity Impact Breakdown"},"description":"Incluye by_severity_and_impact_area, el desglose de conteos por severity+impact_area. Usado por get_open_issues (QSA-1539) para reportar qué quedó fuera del top-N."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/llm/count/by-repository/{repository_id}":{"get":{"summary":"Contar issues LLM de un repositorio","description":"Devuelve el total de issues evaluados por LLM (solo llm_issues) del repositorio según filtros RSQL.","operationId":"count_issues_llm_by_repository_issues_v1_issues_llm_count_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL (mismos filtros que GET /issues/by-repository).","title":"Search"},"description":"Filtro RSQL (mismos filtros que GET /issues/by-repository)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/filters/by-repository/{repository_id}":{"get":{"summary":"Get Issues Filters By Repository","description":"Obtiene los filtros disponibles para issues de un repositorio.\n\nSi se proporciona el parámetro search, filtra los valores de filtros\nsegún los criterios RSQL especificados.\n\nRetorna una lista de filtros con sus valores únicos disponibles,\nen formato estándar para cada filtro.","operationId":"get_issues_filters_by_repository_issues_v1_issues_filters_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL para filtrar valores de filtros (ej: tool_id==abc123)","title":"Search"},"description":"Filtro RSQL para filtrar valores de filtros (ej: tool_id==abc123)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Get Issues Filters By Repository Issues V1 Issues Filters By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/full-scan/filters/by-repository/{repository_id}":{"get":{"summary":"Get Issues Full Scan Filters By Repository","description":"Obtiene los filtros disponibles para issues full_scan de un repositorio.","operationId":"get_issues_full_scan_filters_by_repository_issues_v1_issues_full_scan_filters_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL para filtrar valores de filtros (ej: tool_id==abc123)","title":"Search"},"description":"Filtro RSQL para filtrar valores de filtros (ej: tool_id==abc123)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Get Issues Full Scan Filters By Repository Issues V1 Issues Full Scan Filters By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/issues/llm/filters/by-repository/{repository_id}":{"get":{"summary":"Get Issues Llm Filters By Repository","description":"Obtiene los filtros disponibles para issues evaluados por LLM (solo llm_issues)\nde un repositorio, incluido tool_id para distinguir Architecture/SOLID vs Prompt Scanner.","operationId":"get_issues_llm_filters_by_repository_issues_v1_issues_llm_filters_by_repository__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filtro RSQL para filtrar valores de filtros (ej: tool_id==abc123)","title":"Search"},"description":"Filtro RSQL para filtrar valores de filtros (ej: tool_id==abc123)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Get Issues Llm Filters By Repository Issues V1 Issues Llm Filters By Repository  Repository Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/insights/profiling-report/{repository_id}":{"get":{"tags":["insights"],"summary":"Obtiene el Profiling Report de un repositorio","description":"Retorna un reporte completo de profiling con métricas, insights por categoría,\n    módulos, tipos de code element, severidades, áreas de impacto y reglas.\n    \n    Los parámetros limit_* permiten limitar el número de elementos en cada sección.\n    Para modules se aplica estrategia smart_union: unión de top N por diferentes criterios.","operationId":"get_profiling_report_issues_v1_insights_profiling_report__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"},{"name":"limit_modules","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Límite de módulos por criterio (smart_union)","title":"Limit Modules"},"description":"Límite de módulos por criterio (smart_union)"},{"name":"limit_ce_types","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Límite de tipos de code element","title":"Limit Ce Types"},"description":"Límite de tipos de code element"},{"name":"limit_rules","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Límite de reglas","title":"Limit Rules"},"description":"Límite de reglas"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilingReportResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/issues/v1/insights/llm/profiling-report/{repository_id}":{"get":{"tags":["insights"],"summary":"KPIs descriptivos sobre issues evaluados por LLM (solo llm_issues)","description":"Cuenta por severidad, área de impacto, regla, módulo y categoría de tool sobre el set LLM. No expone stack-profile score ni badge (§2.5, A13).","operationId":"get_llm_profiling_report_issues_v1_insights_llm_profiling_report__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"integer","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LlmProfilingReportResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/live/cards":{"get":{"tags":["analytics"],"summary":"The cards and narrative numbers of the Live checks tab","description":"Checks, files checked, issues found and fixes reported by the agent, plus the workspace figures the narrative needs. Organisation totals for the filters; `members` and `devs_not_connected` ignore the filters.","operationId":"get_live_cards_analytics_v1_live_cards_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the owner of the connection.","title":"User Id"},"description":"Narrow to one developer: the owner of the connection."},{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable. Canonical client label, e.g. 'Cursor'.","title":"Client"},"description":"Repeatable. Canonical client label, e.g. 'Cursor'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveCardsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/live/team":{"get":{"tags":["analytics"],"summary":"Team adoption & tool usage: every member, per client","description":"One row per developer × client with checks in the period, then members with no check in the period (idle), then members with no editor connected. Self-only: a contributor sees their own rows unless an admin turned the team view on. With a client selected, idle rows are left out. The badges are workspace figures.","operationId":"get_live_team_analytics_v1_live_team_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the owner of the connection.","title":"User Id"},"description":"Narrow to one developer: the owner of the connection."},{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable. Canonical client label, e.g. 'Cursor'.","title":"Client"},"description":"Repeatable. Canonical client label, e.g. 'Cursor'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveTeamResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/live/agents":{"get":{"tags":["analytics"],"summary":"Agent performance: per model and client, with the fix rate the agents reported","description":"One row per (model, version, client) with checks in the period; calls that reported no model are the client's 'Model not reported' row, last. The rate is fixes reported by agent ÷ issues found and is not verified. Organisation totals; the rows sum to cards 3 and 4.","operationId":"get_live_agents_analytics_v1_live_agents_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the owner of the connection.","title":"User Id"},"description":"Narrow to one developer: the owner of the connection."},{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable. Canonical client label, e.g. 'Cursor'.","title":"Client"},"description":"Repeatable. Canonical client label, e.g. 'Cursor'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveAgentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/live/pending":{"get":{"tags":["analytics"],"summary":"Checked, not merged: files checked in the editor that have not reached the branch","description":"Per developer × client × repository: files checked in the period, still inside retention, with no merged-file row of their path written after the check. A file counts once, for its latest check; oldest_check_at is its first. No path is returned. Self-only: a contributor sees their own rows unless an admin turned the team view on.","operationId":"get_live_pending_analytics_v1_live_pending_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the owner of the connection.","title":"User Id"},"description":"Narrow to one developer: the owner of the connection."},{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable. Canonical client label, e.g. 'Cursor'.","title":"Client"},"description":"Repeatable. Canonical client label, e.g. 'Cursor'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivePendingResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/live/trends":{"get":{"tags":["analytics"],"summary":"Check volume trends: live checks per ISO week, by client","description":"One item per ISO week (UTC) of the period, weeks without a check included; the last one is the week in progress (partial). Every client is returned. The totals sum to card 1. Organisation totals; all four filters apply.","operationId":"get_live_trends_analytics_v1_live_trends_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the owner of the connection.","title":"User Id"},"description":"Narrow to one developer: the owner of the connection."},{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable. Canonical client label, e.g. 'Cursor'.","title":"Client"},"description":"Repeatable. Canonical client label, e.g. 'Cursor'."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveTrendsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/merge/cards":{"get":{"tags":["analytics"],"summary":"The cards and narrative numbers of the Merge scans tab","description":"Files merged, checked before merge (and the previous period), issues that reached the branch, and the outcome of the issues found in the editor: not merged, verified fixed, reached the branch. Organisation totals for the filters.","operationId":"get_merge_cards_analytics_v1_merge_cards_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the commit author, by email.","title":"User Id"},"description":"Narrow to one developer: the commit author, by email."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeCardsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/merge/weekly":{"get":{"tags":["analytics"],"summary":"Pre-merge check adoption: merged and checked files per ISO week","description":"One item per ISO week (UTC) of the period, weeks without a merged file included; the last one is the week in progress (partial). The bars sum to card 2.","operationId":"get_merge_weekly_analytics_v1_merge_weekly_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the commit author, by email.","title":"User Id"},"description":"Narrow to one developer: the commit author, by email."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeWeeklyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/merge/repositories":{"get":{"tags":["analytics"],"summary":"Codebase risk & compliance: one row per repository with merged files","description":"Files merged, checked before merge, issues that reached the branch and verified fixes per repository, with its last merge scan; issue figures are null for a repository with no completed merge scan. Ordered by checked before merge, low to high. Carries the coverage warning threshold. Organisation totals for the filters.","operationId":"get_merge_repositories_analytics_v1_merge_repositories_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the commit author, by email.","title":"User Id"},"description":"Narrow to one developer: the commit author, by email."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeRepositoriesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/merge/developers":{"get":{"tags":["analytics"],"summary":"Developer merge quality: one row per commit author","description":"Commit authors of the merged files, matched to workspace users by their identity set (QSA-1787); an author matching no current member is a git author row named by the commit. Files merged, checked before merge, issues that reached the branch and verified fixes; verified fixes are null for an author with no live check in the period. Ordered by files merged. Self-only: a contributor sees their own row unless an admin turned the team view on. No email or author digest is returned.","operationId":"get_merge_developers_analytics_v1_merge_developers_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the commit author, by email.","title":"User Id"},"description":"Narrow to one developer: the commit author, by email."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeDevelopersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/merge/agents":{"get":{"tags":["analytics"],"summary":"Agent performance at merge: per model and client, the verified fix rate","description":"The issues found in the editor, grouped by the model, version and client of the check that found them, followed to the imported branch: not merged, verified fixed, reached the branch. The rate is verified fixed / (verified fixed + reached the branch); not merged issues are in no rate. 'Model not reported' rows last. Totals reconcile with cards 3 and 4. Organisation totals for the filters.","operationId":"get_merge_agents_analytics_v1_merge_agents_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","description":"Length of the period in ISO weeks. One of [4, 8, 12, 26].","default":12,"title":"Weeks"},"description":"Length of the period in ISO weeks. One of [4, 8, 12, 26]."},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one repository.","title":"Repository Id"},"description":"Narrow to one repository."},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrow to one developer: the commit author, by email.","title":"User Id"},"description":"Narrow to one developer: the commit author, by email."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeAgentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analytics/v1/settings":{"get":{"tags":["analytics"],"summary":"Read the organisation settings for the Analytics screen","description":"Any member of the organisation may read this: it describes what the organisation decided about them. An organisation that has never changed the setting has no row, and the defaults are returned. Also carries `activity`: whether the organisation has ever live-checked or ever committed, and when it last did either. Those two facts are unbounded by the period and by every filter, which is what lets the screen tell \"nothing has been recorded here\" apart from \"nothing in this window\" instead of showing the same dashes for both (QSA-1748).","operationId":"get_settings_analytics_v1_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSettingsWithActivityResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]},"put":{"tags":["analytics"],"summary":"Change the organisation settings for the Analytics screen","description":"Organisation owners and admins only — anyone else is refused with 403 by the endpoint permission catalogue. Returns the stored value, and records the caller as the last editor.","operationId":"update_settings_analytics_v1_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnalyticsSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSettingsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v1/tools/draft":{"get":{"summary":"Get Tools Draft","description":"Devuelve solo las tools en draft_tools. Mismo payload que GET /tools.","operationId":"get_tools_draft_tools_v1_tools_draft_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tools_api__src__application__responses__tool_response__ToolResponse"},"title":"Response Get Tools Draft Tools V1 Tools Draft Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tools/consolidated":{"get":{"summary":"Get Tools Consolidated","description":"Devuelve solo las tools en consolidated_tools. Mismo payload que GET /tools,\nanotado con entitlement (state/unlock_tier/impact_areas) para la org del caller.","operationId":"get_tools_consolidated_tools_v1_tools_consolidated_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tools_api__src__application__responses__tool_response__ToolResponse"},"title":"Response Get Tools Consolidated Tools V1 Tools Consolidated Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tools":{"get":{"summary":"Get Tools","operationId":"get_tools_tools_v1_tools_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/tools_api__src__application__responses__tool_response__ToolResponse"},"title":"Response Get Tools Tools V1 Tools Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/assign-tools-to-repository/{repository_id}":{"put":{"summary":"Assign Tools To Repository","operationId":"assign_tools_to_repository_tools_v1_assign_tools_to_repository__repository_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","description":"ID del repositorio","title":"Repository Id"},"description":"ID del repositorio"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignToolsToRepositoryBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tools/{tool_id}/targets":{"post":{"summary":"Associate Targets To Tool","description":"Asocia targets a un tool\n\nArgs:\n    tool_id: ID del tool\n    body: Datos de los targets a asociar\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la asociación\n    \nReturns:\n    AssociateTargetsToToolResponse: Targets asociados","operationId":"associate_targets_to_tool_tools_v1_tools__tool_id__targets_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateTargetsToToolBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateTargetsToToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tool/{tool_id}":{"patch":{"summary":"Update Tool Status","description":"Actualiza el status de una tool (ON/OFF).\nRequiere permisos de administrator.\n\nArgs:\n    tool_id: ID de la tool a actualizar\n    body: Datos con el nuevo status\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la actualización\n    \nReturns:\n    UpdateToolStatusResponse: Tool actualizada\n    \nRaises:\n    HTTPException 403: User is not admin\n    HTTPException 404: Tool not found\n    HTTPException 422: Status inválido","operationId":"update_tool_status_tools_v1_tool__tool_id__patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolStatusBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Tool","description":"Elimina una tool y todo lo relacionado (rules, base_issues, ruleset_tools, etc.) en cascada.\nRequiere que la tool exista y sea accesible para el usuario.","operationId":"delete_tool_tools_v1_tool__tool_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tool/consolidate/{tool_id}":{"post":{"summary":"Consolidate Tool","description":"Mueve una draft_tool a consolidated_tools.\nSi la tool ya está consolidada, no hace nada y devuelve la información.","operationId":"consolidate_tool_tools_v1_tool_consolidate__tool_id__post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tools_api__src__application__responses__tool_response__ToolResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tools/by-stack-profile":{"get":{"summary":"Get Tools By Stack Profile","description":"Devuelve las tools según el token Bearer:\n\n- Si el token está en api_keys y el binding (repositorio o conexión) resuelve\n  a un stack_profile vía ``McpKeyContextResolver``:\n  devuelve las tools de ese stack_profile (excluyendo category='Static Code').\n- Si no hay binding MCP: stack profile **Lovable Stack** (nombre en inventarios).\n\nCatálogo RBAC: ``action`` nulo + ``resource_extractor = none`` (mismo patrón que\n``GET /tools``); la lista efectiva usa ``ToolVisibilityFilter`` en el handler\n(incl. merge org/workspace/repo desde api_keys cuando aplica).\n\nRequiere Bearer: clientes ``engine`` / ``mcp_client`` (lookup api_keys) o cliente\nde usuario (p. ej. ``KEYCLOAK_CLIENT_ID`` / ``ai-hub``) con ``azp`` permitido.","operationId":"get_tools_by_stack_profile_tools_v1_tools_by_stack_profile_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetToolsByTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tools/mcp-catalog":{"get":{"summary":"Get Tools Mcp Catalog","description":"Catálogo MCP: con ``api_keys.repository_id`` igual que by-stack-profile; sin repo\nlista consolidada. Excluye tools asociadas solo a targets Language **y sin reglas**\n(un agente de lenguaje con rulesets sí se lista: es lo que ``live_check`` evalúa).\n\nCatálogo RBAC: fila auth-only (``action`` nulo, ``resource_extractor = none``);\nvisibilidad vía ``GetMcpToolsCatalog`` / ``ToolVisibilityFilter``.","operationId":"get_tools_mcp_catalog_tools_v1_tools_mcp_catalog_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetToolsByTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tool/{tool_id}/ce-types/{ce_type_id}":{"post":{"tags":["tools"],"summary":"Associate Ce Type","operationId":"associate_ce_type_tools_v1_tool__tool_id__ce_types__ce_type_id__post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"ce_type_id","in":"path","required":true,"schema":{"type":"string","title":"Ce Type Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tools"],"summary":"Dissociate Ce Type","operationId":"dissociate_ce_type_tools_v1_tool__tool_id__ce_types__ce_type_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"ce_type_id","in":"path","required":true,"schema":{"type":"string","title":"Ce Type Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/tool/{tool_id}/agent-features/{agent_feature_id}":{"post":{"tags":["tools"],"summary":"Associate Agent Feature","operationId":"associate_agent_feature_tools_v1_tool__tool_id__agent_features__agent_feature_id__post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"agent_feature_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Feature Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tools"],"summary":"Dissociate Agent Feature","operationId":"dissociate_agent_feature_tools_v1_tool__tool_id__agent_features__agent_feature_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}},{"name":"agent_feature_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Feature Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/available":{"get":{"tags":["stack-profiles-picker"],"summary":"List stack profiles available to the current user","operationId":"list_available_stack_profiles_tools_v1_stack_profiles_available_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated scopes to include: global,org,workspace","title":"Scope"},"description":"Comma-separated scopes to include: global,org,workspace"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableStackProfilesPageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles":{"get":{"summary":"List Stack Profiles","description":"Lista todos los stack profiles\n\nArgs:\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la consulta\n    credentials: Credenciales de autorización\n    \nReturns:\n    ListStackProfilesResponse: Lista de stack profiles","operationId":"list_stack_profiles_tools_v1_stack_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListStackProfilesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]},"post":{"summary":"Create Stack Profile","description":"Crea un nuevo stack profile\n\nArgs:\n    body: Datos del stack profile a crear\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la creación\n    credentials: Credenciales de autorización\n    \nReturns:\n    CreateStackProfileResponse: Stack profile creado","operationId":"create_stack_profile_tools_v1_stack_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStackProfileBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v1/stack-profiles/{stack_profile_id}":{"get":{"summary":"Get Stack Profile By Id","description":"Obtiene un stack profile por su ID\n\nArgs:\n    stack_profile_id: ID del stack profile a obtener\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la consulta\n    credentials: Credenciales de autorización\n    \nReturns:\n    GetStackProfileByIdResponse: Stack profile encontrado o None si does not exist","operationId":"get_stack_profile_by_id_tools_v1_stack_profiles__stack_profile_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"stack_profile_id","in":"path","required":true,"schema":{"type":"string","title":"Stack Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStackProfileByIdResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Stack Profile","description":"Actualiza un stack profile existente\n\nArgs:\n    stack_profile_id: ID del stack profile a actualizar\n    body: Datos actualizados del stack profile\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la actualización\n    credentials: Credenciales de autorización\n    \nReturns:\n    UpdateStackProfileResponse: Stack profile actualizado","operationId":"update_stack_profile_tools_v1_stack_profiles__stack_profile_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"stack_profile_id","in":"path","required":true,"schema":{"type":"string","title":"Stack Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStackProfileBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/{stack_profile_id}/targets":{"post":{"summary":"Associate Targets To Stack Profile","description":"Asocia targets a un stack profile\n\nArgs:\n    stack_profile_id: ID del stack profile\n    body: Datos de los targets a asociar\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la asociación\n    credentials: Credenciales de autorización\n    \nReturns:\n    AssociateTargetsToStackProfileResponse: Targets asociados","operationId":"associate_targets_to_stack_profile_tools_v1_stack_profiles__stack_profile_id__targets_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"stack_profile_id","in":"path","required":true,"schema":{"type":"string","title":"Stack Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateTargetsToStackProfileBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssociateTargetsToStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Targets By Stack Profile","description":"Obtiene todos los targets asociados a un stack profile específico\n\nArgs:\n    stack_profile_id: ID del stack profile\n    include: Query param opcional para incluir metadata adicional\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la consulta\n    credentials: Credenciales de autorización\n    \nReturns:\n    GetTargetsByStackProfileResponse: Lista de targets asociados al stack profile","operationId":"get_targets_by_stack_profile_tools_v1_stack_profiles__stack_profile_id__targets_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"stack_profile_id","in":"path","required":true,"schema":{"type":"string","title":"Stack Profile Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales a incluir (valores permitidos: tools_metadata, autodiscovery_evidences)","title":"Include"},"description":"Campos adicionales a incluir (valores permitidos: tools_metadata, autodiscovery_evidences)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTargetsByStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-targets":{"get":{"summary":"List Stack Targets","description":"Lista todos los stack targets visibles para el caller.","operationId":"list_stack_targets_tools_v1_stack_targets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListStackTargetsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]},"post":{"summary":"Create Stack Target","description":"Crea un nuevo stack target.","operationId":"create_stack_target_tools_v1_stack_targets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStackTargetBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStackTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v1/stack-targets/{target_id}":{"put":{"summary":"Update Stack Target","description":"Actualiza un stack target existente.","operationId":"update_stack_target_tools_v1_stack_targets__target_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStackTargetBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStackTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-targets/{target_id}/tools/draft":{"get":{"summary":"Get Tools By Target Draft","description":"Devuelve solo las tools en draft_tools para el target. Mismo payload que GET .../tools.","operationId":"get_tools_by_target_draft_tools_v1_stack_targets__target_id__tools_draft_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include"}},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restringe a tools disponibles para el repo","title":"Repository Id"},"description":"Restringe a tools disponibles para el repo"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetToolsByTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-targets/{target_id}/tools/consolidated":{"get":{"summary":"Get Tools By Target Consolidated","description":"Devuelve solo las tools en consolidated_tools para el target. Mismo payload que GET .../tools.","operationId":"get_tools_by_target_consolidated_tools_v1_stack_targets__target_id__tools_consolidated_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include"}},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restringe a tools disponibles para el repo","title":"Repository Id"},"description":"Restringe a tools disponibles para el repo"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetToolsByTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-targets/{target_id}/tools":{"get":{"summary":"Get Tools By Target","description":"Obtiene todos los tools asociados a un target específico.","operationId":"get_tools_by_target_tools_v1_stack_targets__target_id__tools_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include"}},{"name":"repository_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Restringe a tools disponibles para el repo","title":"Repository Id"},"description":"Restringe a tools disponibles para el repo"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetToolsByTargetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories":{"get":{"summary":"Listar repositorios","description":"Devuelve los repositorios accesibles según las organizaciones del token. El query **include** permite enriquecer cada elemento con datos relacionados.","operationId":"list_repositories_tools_v1_repositories_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recursos a incluir","description":"Tokens separados por coma (ej. `scan,inventory,stack_profile,active_api_keys,active_schedule,agent_metrics`). Cada token añade datos opcionales a **cada** ítem de `repositories`:\n\n| Valor | Efecto |\n|-------|--------|\n| `scan` | Último scan del repositorio (cualquier status). |\n| `last_success_scan` | Último scan con status SUCCESS o PARTIAL. |\n| `inventory` | Snapshot legacy (inventario de tools) asociado al repo. |\n| `stack_profile` | Perfil curado (`stack_profiles`) ligado por `repositories.stack_profile_id`. |\n| `active_api_keys` | API keys no revocadas y no expiradas. |\n| `active_schedule` | Schedule de scan activo del repositorio. |\n| `agent_metrics` | KPIs de agentes inactivos del repo (QSA-927, ADR-017). |\n\nLos valores se pueden combinar en cualquier orden."},"description":"Tokens separados por coma (ej. `scan,inventory,stack_profile,active_api_keys,active_schedule,agent_metrics`). Cada token añade datos opcionales a **cada** ítem de `repositories`:\n\n| Valor | Efecto |\n|-------|--------|\n| `scan` | Último scan del repositorio (cualquier status). |\n| `last_success_scan` | Último scan con status SUCCESS o PARTIAL. |\n| `inventory` | Snapshot legacy (inventario de tools) asociado al repo. |\n| `stack_profile` | Perfil curado (`stack_profiles`) ligado por `repositories.stack_profile_id`. |\n| `active_api_keys` | API keys no revocadas y no expiradas. |\n| `active_schedule` | Schedule de scan activo del repositorio. |\n| `agent_metrics` | KPIs de agentes inactivos del repo (QSA-927, ADR-017). |\n\nLos valores se pueden combinar en cualquier orden."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filtro RSQL","description":"Filtro RSQL opcional. Operador soportado: `==`.\n\nCampos disponibles: `workspace_id`.\n\nEjemplo: `?search=workspace_id==3fa85f64-5717-4562-b3fc-2c963f66afa6`"},"description":"Filtro RSQL opcional. Operador soportado: `==`.\n\nCampos disponibles: `workspace_id`.\n\nEjemplo: `?search=workspace_id==3fa85f64-5717-4562-b3fc-2c963f66afa6`"}],"responses":{"200":{"description":"Lista de repositorios; los campos opcionales dependen del parámetro `include`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRepositoriesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/badge-summary/{repository_id}":{"get":{"summary":"Resumen badge del repositorio","operationId":"get_repository_badge_summary_tools_v1_repositories_badge_summary__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryBadgeSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/{repository_id}/stack-profile-score":{"get":{"summary":"Stack profile score del repositorio","description":"Veredicto production-ready: overall score, tier, hard-fail y grid por impact area (ADR-019). Complementa badge-summary; no lo modifica.","operationId":"get_repository_stack_profile_score_tools_v1_repositories__repository_id__stack_profile_score_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryStackProfileScoreResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/mcp-applied-actions":{"get":{"summary":"Listar acciones MCP aplicadas por repositorio o conexión","description":"Usa target_type=repository con target_id=id de repositorio, o target_type=connection con target_id=UUID de la conexión (ADR-006).","operationId":"list_mcp_applied_actions_by_target_tools_v1_mcp_applied_actions_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"target_type","in":"query","required":true,"schema":{"enum":["repository","connection"],"type":"string","description":"Ámbito del listado: repositorio importado o conexión standalone","title":"Target Type"},"description":"Ámbito del listado: repositorio importado o conexión standalone"},{"name":"target_id","in":"query","required":true,"schema":{"type":"string","description":"Identificador del repositorio (string) o UUID de la conexión","title":"Target Id"},"description":"Identificador del repositorio (string) o UUID de la conexión"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Tamaño de página (por defecto 30)","default":30,"title":"Page Size"},"description":"Tamaño de página (por defecto 30)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Desplazamiento para paginación","default":0,"title":"Offset"},"description":"Desplazamiento para paginación"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpAppliedActionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/{repository_id}/mcp-applied-actions":{"get":{"summary":"Listar acciones MCP aplicadas del repositorio","operationId":"list_mcp_applied_actions_tools_v1_repositories__repository_id__mcp_applied_actions_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Tamaño de página (por defecto 30)","default":30,"title":"Page Size"},"description":"Tamaño de página (por defecto 30)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Desplazamiento para paginación","default":0,"title":"Offset"},"description":"Desplazamiento para paginación"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMcpAppliedActionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/{repository_id}":{"get":{"summary":"Get Repository By Id","operationId":"get_repository_by_id_tools_v1_repositories__repository_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales a incluir (ej: tools_metrics,scan_status,last_success_scan_status,target_metrics)","title":"Include"},"description":"Campos adicionales a incluir (ej: tools_metrics,scan_status,last_success_scan_status,target_metrics)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRepositoryByIdResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Repository","operationId":"delete_repository_tools_v1_repositories__repository_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/{repository_id}/agents/{agent_id}":{"post":{"tags":["repositories"],"summary":"Add an agent to the repository project stack profile","description":"Ensures a project-level profile (fork if needed), then attaches the tool locally.","operationId":"add_agent_to_repository_project_profile_tools_v1_repositories__repository_id__agents__agent_id__post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAgentToRepositoryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/{repository_id}/stack-profile-matches":{"get":{"tags":["repositories"],"summary":"Top-N global stack profiles matching the repository's detected stack","operationId":"get_stack_profile_matches_tools_v1_repositories__repository_id__stack_profile_matches_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum number of matches to return (1–10, default 3)","default":3,"title":"Limit"},"description":"Maximum number of matches to return (1–10, default 3)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileMatchesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/repositories/{repository_id}/stack-profile":{"put":{"tags":["repositories"],"summary":"Change curated stack profile for a repository (until locked)","operationId":"change_repository_stack_profile_tools_v1_repositories__repository_id__stack_profile_put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeStackProfileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"204":{"description":"Same curated parent already selected (locked repo)"},"409":{"description":"Different profile requested while locked"},"404":{"description":"Repository or stack profile not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/rules-metrics/by-repository/{repository_id}/by-tool/{tool_id}":{"get":{"tags":["rules-metrics"],"summary":"Get Rules Metrics","description":"Obtiene las métricas de reglas para un repositorio y tool específicos.\n\nArgs:\n    repository_id: ID del repositorio\n    tool_id: ID de la herramienta\n    authenticated_user: Usuario autenticado\n    handler: Handler para procesar la solicitud\n    db_session: Sesión de base de datos\n    \nReturns:\n    List[RuleMetricNode]: Lista de métricas por regla","operationId":"get_rules_metrics_tools_v1_rules_metrics_by_repository__repository_id__by_tool__tool_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","title":"Tool Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleMetricNode"},"title":"Response Get Rules Metrics Tools V1 Rules Metrics By Repository  Repository Id  By Tool  Tool Id  Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/build":{"post":{"summary":"Build Framework Rules","description":"Build framework-specific rules using LLM.\n\nThis endpoint generates a JSON file with framework-specific rules by:\n1. Validating that the target exists and is a Framework\n2. Generating rules using LLM with a specialized prompt\n3. Saving the rules to tools_api/data/{repository_id}/tool_builder/{target_key}/rules.json\n\nArgs:\n    body: Request body with target_key, repository_id, and optional framework_version\n    authenticated_user: Authenticated user making the request\n    handler: Handler for processing the request\n    credentials: Authorization credentials\n    \nReturns:\n    BuildFrameworkRulesResponse: Response with status and rules file path\n    \nRaises:\n    HTTPException 422: If target doesn't exist, is not a Framework, or validation fails\n    HTTPException 400: For other errors during processing","operationId":"build_framework_rules_tools_v1_build_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFrameworkRulesBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFrameworkRulesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v1/curated-stack-profiles/{repository_id}/targets":{"get":{"tags":["curated-stack-profiles"],"summary":"Targets for a repository (inventory) with optional agent and autodiscovery metadata","operationId":"get_targets_by_curated_repository_tools_v1_curated_stack_profiles__repository_id__targets_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"repository_id","in":"path","required":true,"schema":{"type":"string","title":"Repository Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Campos adicionales (tools, tools_metadata, autodiscovery_evidences)","title":"Include"},"description":"Campos adicionales (tools, tools_metadata, autodiscovery_evidences)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTargetsByCuratedRepositoryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/curated-stack-profiles":{"post":{"tags":["curated-stack-profiles"],"summary":"Create a curated stack profile from scratch","description":"Create a new curated stack profile at org, workspace, or project scope.","operationId":"create_curated_stack_profile_tools_v1_curated_stack_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCuratedStackProfileBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratedStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v1/curated-stack-profiles/{profile_id}":{"put":{"tags":["curated-stack-profiles"],"summary":"Update name and/or description of a curated stack profile","description":"Update the name and/or description of an existing curated stack profile.","operationId":"update_curated_stack_profile_tools_v1_curated_stack_profiles__profile_id__put","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCuratedStackProfileBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratedStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/{profile_id}/promote":{"patch":{"tags":["curated-stack-profiles"],"summary":"Promote a stack profile one level up (workspace→org or project→workspace)","description":"Re-scope the profile upward; project→workspace creates a project fork for the origin repo.","operationId":"promote_stack_profile_tools_v1_stack_profiles__profile_id__promote_patch","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteStackProfileBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuratedStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/{profile_id}/fork":{"post":{"tags":["curated-stack-profiles"],"summary":"Fork a stack profile into a lower or equal scope","description":"Fork an existing stack profile into a target scope.\n\nExactly one of org_id, workspace_id, repository_id must be provided.\nThe target scope must be equal to or lower than the source scope.\nAll agents from the source are copied with origin='inherited'.","operationId":"fork_stack_profile_tools_v1_stack_profiles__profile_id__fork_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkStackProfileBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkStackProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/{profile_id}/agents":{"get":{"tags":["curated-stack-profiles"],"summary":"List agents of a stack profile with inheritance info","description":"Return agents with origin, can_remove flag, inherited_from, and full chain.","operationId":"list_stack_profile_agents_tools_v1_stack_profiles__profile_id__agents_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileAgentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/{profile_id}/agents/{agent_id}/cascade-preview":{"get":{"tags":["curated-stack-profiles"],"summary":"Dry-run: count descendants affected if this agent were added and propagated","description":"Read-only preview; does not attach the agent. Requires stack_profile:preview_cascade.","operationId":"cascade_preview_add_agent_tools_v1_stack_profiles__profile_id__agents__agent_id__cascade_preview_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCascadePreviewResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v1/stack-profiles/{profile_id}/agents/{agent_id}":{"post":{"tags":["curated-stack-profiles"],"summary":"Attach a tool as a local agent on a stack profile","description":"Attach base_tools.id = agent_id with origin local; 409 if a link already exists.","operationId":"attach_stack_profile_agent_tools_v1_stack_profiles__profile_id__agents__agent_id__post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddStackProfileAgentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["curated-stack-profiles"],"summary":"Detach a locally attached agent from a stack profile","description":"Remove only local links; 422 if the agent is inherited from a parent profile.","operationId":"detach_stack_profile_agent_tools_v1_stack_profiles__profile_id__agents__agent_id__delete","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveStackProfileAgentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/v2/build":{"post":{"summary":"Build Framework Rules V2","description":"Async build of framework-specific rules using LLM.\n\nValidates the request synchronously (same rules as v1) and returns HTTP 202 after persisting\na minimal ``base_tools`` row so ``GET /api/v2/tool-builder-status/{tool_id}`` RBAC can resolve\nthe tool immediately. The actual build and a subsequent partial scan run in a background thread.\n\nRaises:\n    HTTPException 422: If target does not exist, is not Framework/Language/Platform, or impact areas are invalid.\n    HTTPException 400: For unexpected errors during validation.","operationId":"build_framework_rules_v2_tools_v2_build_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFrameworkRulesBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFrameworkRulesV2Response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v2/rebuild":{"post":{"summary":"Rebuild Framework Rules V2","description":"Delete an existing tool and rebuild it asynchronously with new parameters.\n\nResolves the target_key from the existing tool, deletes the tool (including cascade),\nthen validates and starts the async build pipeline — identical to POST /build.\n\nRaises:\n    HTTPException 404: If tool does not exist or is not accessible by the user.\n    HTTPException 500: If the delete operation fails.\n    HTTPException 422: If the resolved target is invalid or impact areas are unknown.\n    HTTPException 400: For unexpected errors during validation.","operationId":"rebuild_framework_rules_v2_tools_v2_rebuild_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFrameworkRulesRebuildBody"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildFrameworkRulesV2Response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/tools/v2/tool-builder-status/{tool_id}":{"get":{"summary":"Get Tool Builder Status","description":"Stream tool-builder execution progress as Server-Sent Events.\n\nReturns a continuous SSE stream reporting process-level progress until the\nbuild pipeline finishes (event: tool_builder_finished) or an error occurs.","operationId":"get_tool_builder_status_tools_v2_tool_builder_status__tool_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"tool_id","in":"path","required":true,"schema":{"type":"string","description":"Tool ID to stream build progress for","title":"Tool Id"},"description":"Tool ID to stream build progress for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/referrals":{"get":{"tags":["referrals"],"summary":"List referrals sent by the authenticated user","operationId":"list_referrals_api_v1_referrals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReferralsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]},"post":{"tags":["referrals"],"summary":"Send a referral invitation","operationId":"send_referral_api_v1_referrals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReferralRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendReferralResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/referrals/{token}/info":{"get":{"tags":["referrals"],"summary":"Public referral token metadata","operationId":"get_referral_info_api_v1_referrals__token__info_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReferralInfoResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/referrals/{token}/accept":{"post":{"tags":["referrals"],"summary":"Accept a referral invitation","operationId":"accept_referral_api_v1_referrals__token__accept_post","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptReferralResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/mandrill/referrals":{"post":{"tags":["referrals-webhooks"],"summary":"Receive Mandrill bounce events for referral invitations","operationId":"mandrill_referrals_webhook_api_v1_webhooks_mandrill_referrals_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Mandrill Referrals Webhook Api V1 Webhooks Mandrill Referrals Post"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]},"head":{"tags":["referrals-webhooks"],"summary":"Mandrill URL reachability check (HEAD)","description":"Mandrill probes new webhook URLs with HEAD before the signed empty POST.","operationId":"mandrill_referrals_webhook_head_api_v1_webhooks_mandrill_referrals_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/api/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit in-app feedback","operationId":"submit_feedback_api_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFeedbackResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/public/v1/demo/repository":{"get":{"summary":"Public Demo Repository","operationId":"public_demo_repository_public_v1_demo_repository_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Same include tokens as the authenticated endpoint (agent_metrics excluded).","title":"Include"},"description":"Same include tokens as the authenticated endpoint (agent_metrics excluded)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRepositoryByIdResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/repository/badge-summary":{"get":{"summary":"Public Demo Badge Summary","operationId":"public_demo_badge_summary_public_v1_demo_repository_badge_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryBadgeSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/public/v1/demo/repository/stack-profile-score":{"get":{"summary":"Public Demo Stack Profile Score","operationId":"public_demo_stack_profile_score_public_v1_demo_repository_stack_profile_score_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryStackProfileScoreResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/public/v1/demo/repository/stack-profile-matches":{"get":{"summary":"Public Demo Stack Profile Matches","operationId":"public_demo_stack_profile_matches_public_v1_demo_repository_stack_profile_matches_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Maximum number of matches to return (1-10, default 3)","default":3,"title":"Limit"},"description":"Maximum number of matches to return (1-10, default 3)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackProfileMatchesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/coverage":{"get":{"summary":"Public Demo Coverage","operationId":"public_demo_coverage_public_v1_demo_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicDemoCoverageResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/public/v1/demo/issues":{"get":{"summary":"Public Demo Issues","operationId":"public_demo_issues_public_v1_demo_issues_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Additional fields (e.g. tools).","title":"Include"},"description":"Additional fields (e.g. tools)."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RSQL search filter (same as the authenticated endpoint).","title":"Search"},"description":"RSQL search filter (same as the authenticated endpoint)."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field(s) (e.g. -rule.severity,line_number).","title":"Sort"},"description":"Sort field(s) (e.g. -rule.severity,line_number)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/issues/count":{"get":{"summary":"Public Demo Issues Count","operationId":"public_demo_issues_count_public_v1_demo_issues_count_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RSQL search filter (same as the authenticated endpoint).","title":"Search"},"description":"RSQL search filter (same as the authenticated endpoint)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountIssuesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/issues/filters":{"get":{"summary":"Public Demo Issues Filters","operationId":"public_demo_issues_filters_public_v1_demo_issues_filters_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RSQL filter to narrow filter values.","title":"Search"},"description":"RSQL filter to narrow filter values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FilterResponse"},"title":"Response Public Demo Issues Filters Public V1 Demo Issues Filters Get"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/insights/profiling-report":{"get":{"summary":"Public Demo Profiling Report","operationId":"public_demo_profiling_report_public_v1_demo_insights_profiling_report_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"limit_modules","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Limit Modules"}},{"name":"limit_ce_types","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Limit Ce Types"}},{"name":"limit_rules","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Limit Rules"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilingReportResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/rules":{"get":{"summary":"Public Demo Rules","operationId":"public_demo_rules_public_v1_demo_rules_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Additional fields; only issues_metadata is served publicly.","title":"Include"},"description":"Additional fields; only issues_metadata is served publicly."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RSQL search filter (same as the authenticated endpoint).","title":"Search"},"description":"RSQL search filter (same as the authenticated endpoint)."},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort field(s) (e.g. -rule.severity,rule.name).","title":"Sort"},"description":"Sort field(s) (e.g. -rule.severity,rule.name)."},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"footprint (default) = rules with findings; applicable = all rules on the demo's curated profile.","default":"footprint","title":"Scope"},"description":"footprint (default) = rules with findings; applicable = all rules on the demo's curated profile."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tamaño de página","default":50,"title":"Limit"},"description":"Tamaño de página"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor opaco","title":"Cursor"},"description":"Cursor opaco"},{"name":"direction","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CursorDirection","description":"Dirección: next|prev|last","default":"next"},"description":"Dirección: next|prev|last"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedRulesCommonDataResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/rules/count":{"get":{"summary":"Public Demo Rules Count","operationId":"public_demo_rules_count_public_v1_demo_rules_count_get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"RSQL search filter (same as the authenticated endpoint).","title":"Search"},"description":"RSQL search filter (same as the authenticated endpoint)."},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"footprint (default) = rules with findings; applicable = all rules on the demo's curated profile.","default":"footprint","title":"Scope"},"description":"footprint (default) = rules with findings; applicable = all rules on the demo's curated profile."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountRulesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/v1/demo/rules/{rule_id}":{"get":{"summary":"Public Demo Rule","operationId":"public_demo_rule_public_v1_demo_rules__rule_id__get","security":[{"HTTPBearer":[]},{"keycloak-openid":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","description":"Id of a rule referenced by a current demo issue.","title":"Rule Id"},"description":"Id of a rule referenced by a current demo issue."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleCoreResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource/mcp/":{"get":{"summary":"Mcp Oauth Protected Resource Metadata","description":"Serve the RFC 9728 protected-resource-metadata at the domain-root\nwell-known URI the /mcp 401 challenge advertises.\n\nRFC 8615 well-known URIs must live at the domain root, but mounting\nmcp_app under /mcp (above) nests FastMCP's own metadata route one level\ndown. The earlier QSA-1268 stopgap 307-redirected here, which breaks\nstrict OAuth clients (e.g. Claude Code) that do not follow redirects\nduring discovery — they never reach the nested document and report a\nconnection failure. Serving the document directly (200) at the advertised\nURI is what RFC 9728 requires; the nested FastMCP route stays as-is.\n\nThe origin-level path (no ``/mcp`` suffix) is also published: MCP Inspector\nprobes it first and aborts OAuth when that probe returns 401 from the\ngeneric API auth middleware.","operationId":"mcp_oauth_protected_resource_metadata__well_known_oauth_protected_resource_mcp__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Mcp Oauth Protected Resource Metadata","description":"Serve the RFC 9728 protected-resource-metadata at the domain-root\nwell-known URI the /mcp 401 challenge advertises.\n\nRFC 8615 well-known URIs must live at the domain root, but mounting\nmcp_app under /mcp (above) nests FastMCP's own metadata route one level\ndown. The earlier QSA-1268 stopgap 307-redirected here, which breaks\nstrict OAuth clients (e.g. Claude Code) that do not follow redirects\nduring discovery — they never reach the nested document and report a\nconnection failure. Serving the document directly (200) at the advertised\nURI is what RFC 9728 requires; the nested FastMCP route stays as-is.\n\nThe origin-level path (no ``/mcp`` suffix) is also published: MCP Inspector\nprobes it first and aborts OAuth when that probe returns 401 from the\ngeneric API auth middleware.","operationId":"mcp_oauth_protected_resource_metadata__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/.well-known/oauth-protected-resource/":{"get":{"summary":"Mcp Oauth Protected Resource Metadata","description":"Serve the RFC 9728 protected-resource-metadata at the domain-root\nwell-known URI the /mcp 401 challenge advertises.\n\nRFC 8615 well-known URIs must live at the domain root, but mounting\nmcp_app under /mcp (above) nests FastMCP's own metadata route one level\ndown. The earlier QSA-1268 stopgap 307-redirected here, which breaks\nstrict OAuth clients (e.g. Claude Code) that do not follow redirects\nduring discovery — they never reach the nested document and report a\nconnection failure. Serving the document directly (200) at the advertised\nURI is what RFC 9728 requires; the nested FastMCP route stays as-is.\n\nThe origin-level path (no ``/mcp`` suffix) is also published: MCP Inspector\nprobes it first and aborts OAuth when that probe returns 401 from the\ngeneric API auth middleware.","operationId":"mcp_oauth_protected_resource_metadata__well_known_oauth_protected_resource__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/.well-known/oauth-protected-resource":{"get":{"summary":"Mcp Oauth Protected Resource Metadata","description":"Serve the RFC 9728 protected-resource-metadata at the domain-root\nwell-known URI the /mcp 401 challenge advertises.\n\nRFC 8615 well-known URIs must live at the domain root, but mounting\nmcp_app under /mcp (above) nests FastMCP's own metadata route one level\ndown. The earlier QSA-1268 stopgap 307-redirected here, which breaks\nstrict OAuth clients (e.g. Claude Code) that do not follow redirects\nduring discovery — they never reach the nested document and report a\nconnection failure. Serving the document directly (200) at the advertised\nURI is what RFC 9728 requires; the nested FastMCP route stays as-is.\n\nThe origin-level path (no ``/mcp`` suffix) is also published: MCP Inspector\nprobes it first and aborts OAuth when that probe returns 401 from the\ngeneric API auth middleware.","operationId":"mcp_oauth_protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResponse"}}}}},"security":[{"HTTPBearer":[]},{"keycloak-openid":[]}]}}},"components":{"schemas":{"AcceptReferralResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","status"],"title":"AcceptReferralResponse"},"ActiveScheduleNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"timing":{"$ref":"#/components/schemas/ActiveScheduleTimingNode"},"active":{"type":"boolean","title":"Active"},"next_run_at":{"type":"string","format":"date-time","title":"Next Run At"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","timing","active","next_run_at","consecutive_failures","created_at","updated_at"],"title":"ActiveScheduleNode"},"ActiveScheduleTimingNode":{"properties":{"frequency_weeks":{"type":"integer","title":"Frequency Weeks"},"day_of_week":{"type":"integer","title":"Day Of Week"},"local_time":{"type":"string","title":"Local Time"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["frequency_weeks","day_of_week","local_time","timezone"],"title":"ActiveScheduleTimingNode"},"AddAgentToRepositoryResponse":{"properties":{"stack_profile":{"$ref":"#/components/schemas/CuratedStackProfileResponse"},"agents":{"items":{"$ref":"#/components/schemas/ProfileAgentResponse"},"type":"array","title":"Agents"},"inheritance_chain":{"items":{"$ref":"#/components/schemas/InheritanceChainNode"},"type":"array","title":"Inheritance Chain"}},"type":"object","required":["stack_profile","agents","inheritance_chain"],"title":"AddAgentToRepositoryResponse","description":"Project stack profile metadata plus full agent list (same shape as list agents)."},"AddStackProfileAgentResponse":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"origin":{"type":"string","title":"Origin","description":"Link origin after attach","default":"local"},"propagated_to":{"type":"integer","title":"Propagated To","description":"Descendant profiles updated by propagation (stub returns 0).","default":0}},"type":"object","required":["tool_id"],"title":"AddStackProfileAgentResponse"},"AddWorkspaceMemberRequest":{"properties":{"user_id":{"type":"string","maxLength":255,"minLength":1,"title":"User Id"},"role_name":{"type":"string","maxLength":100,"minLength":1,"title":"Role Name"}},"type":"object","required":["user_id","role_name"],"title":"AddWorkspaceMemberRequest","description":"Request body for POST /workspaces/{workspace_id}/members."},"AdminTierChangeRequest":{"properties":{"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id","description":"Internal organisations.id UUID of the org to change."},"target_tier_code":{"type":"string","title":"Target Tier Code","description":"Tier code to move the organisation to (must exist in the tiers table)."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional free-text reason recorded in the audit trail (QSA-1363)."}},"type":"object","required":["organisation_id","target_tier_code"],"title":"AdminTierChangeRequest","description":"POST /admin/tiers/change — move one organisation to a target tier.\n\n``organisation_id`` is the internal ``organisations.id`` UUID (the identity\nthe Backoffice Customer 360 screen already holds), not the Keycloak org id.\n``target_tier_code`` is validated against the ``tiers`` table server-side, so\nit is a plain string here (an unknown code yields a 422 listing valid tiers\nrather than a generic enum error)."},"AdminTierChangeResponse":{"properties":{"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"previous_tier_code":{"type":"string","title":"Previous Tier Code"},"tier_code":{"type":"string","title":"Tier Code"},"tier_source":{"type":"string","title":"Tier Source"},"changed":{"type":"boolean","title":"Changed"},"message":{"type":"string","title":"Message"}},"type":"object","required":["organisation_id","previous_tier_code","tier_code","tier_source","changed","message"],"title":"AdminTierChangeResponse","description":"Outcome of a manual tier change.\n\n``changed`` is ``False`` for the idempotent no-op case (rule 9): the org was\nalready on the requested tier, so nothing was persisted."},"AdminTierCreateRequest":{"properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,19}$","title":"Code","description":"Immutable catalogue key, lower snake case, up to 20 characters (for example 'solo_developer')."},"name":{"type":"string","maxLength":50,"title":"Name","description":"Display name shown to customers."},"description":{"type":"string","title":"Description","description":"Customer-facing description.","default":""},"rank":{"type":"integer","minimum":0.0,"title":"Rank","description":"Commercial order, unique across tiers. Leave gaps so a tier can be inserted later (the seeded ranks are 0, 10, 20, 30, 100)."},"price_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Amount","description":"Price in the currency's minor unit (pence, cents)."},"currency":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Currency","description":"ISO currency code, for example 'GBP'."},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users","description":"Seat cap. Null means unlimited."},"is_billable":{"type":"boolean","title":"Is Billable","description":"Whether the tier can be bought through self-service checkout. Requires both Stripe identifiers.","default":false},"stripe_price_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Price Id","description":"Stripe price id, created in the Stripe dashboard beforehand."},"stripe_product_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Product Id","description":"Stripe product id, created in the Stripe dashboard beforehand."}},"type":"object","required":["code","name","rank"],"title":"AdminTierCreateRequest","description":"POST /admin/tiers — add a tier to the catalogue.\n\nThe tier is created **retired**: it becomes visible for sale only after its\nquotas are configured and it is activated (QSA-1624). There is deliberately\nno ``is_active`` field here."},"AdminTierQuotaItem":{"properties":{"quota_key":{"type":"string","title":"Quota Key","description":"One of the keys the licensing code reads: max_autofixes_per_month, max_connections, max_repositories, max_scans_per_month, max_scans_per_week, max_users, max_workspaces."},"max_allowed":{"type":"integer","minimum":0.0,"title":"Max Allowed","description":"The limit. 0 means nothing is allowed."},"reset_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset Period","description":"'weekly' or 'monthly' for a rolling pool, null for a standing limit. It must match the period the key requires."}},"type":"object","required":["quota_key","max_allowed"],"title":"AdminTierQuotaItem","description":"One quota template row."},"AdminTierQuotaResponse":{"properties":{"quota_key":{"type":"string","title":"Quota Key"},"max_allowed":{"type":"integer","title":"Max Allowed"},"reset_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset Period"}},"type":"object","required":["quota_key","max_allowed","reset_period"],"title":"AdminTierQuotaResponse"},"AdminTierQuotasRequest":{"properties":{"quotas":{"items":{"$ref":"#/components/schemas/AdminTierQuotaItem"},"type":"array","title":"Quotas"}},"type":"object","required":["quotas"],"title":"AdminTierQuotasRequest","description":"PUT /admin/tiers/{code}/quotas — replace the whole quota template.\n\nA replace, not a merge: a quota template is a complete statement of what the\ntier grants, so sending a key set without one key removes it."},"AdminTierResponse":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"rank":{"type":"integer","title":"Rank"},"is_billable":{"type":"boolean","title":"Is Billable"},"is_active":{"type":"boolean","title":"Is Active"},"price_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"stripe_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Product Id"},"organisations_count":{"type":"integer","title":"Organisations Count"},"quotas":{"items":{"$ref":"#/components/schemas/AdminTierQuotaResponse"},"type":"array","title":"Quotas"},"tools":{"items":{"$ref":"#/components/schemas/AdminTierToolResponse"},"type":"array","title":"Tools"}},"type":"object","required":["code","name","description","rank","is_billable","is_active","price_amount","currency","max_users","stripe_price_id","stripe_product_id","organisations_count","quotas","tools"],"title":"AdminTierResponse","description":"One tier as an administrator sees it.\n\nUnlike the public ``TierResponse`` on GET /api/v1/tiers, this carries the\nStripe identifiers and the organisation count. It is served only behind the\nsystem-admin guard."},"AdminTierStatusRequest":{"properties":{"is_active":{"type":"boolean","title":"Is Active","description":"False retires the tier: it is offered for nothing new, and the organisations already on it keep it untouched."}},"type":"object","required":["is_active"],"title":"AdminTierStatusRequest","description":"PATCH /admin/tiers/{code}/status — retire a tier or bring it back."},"AdminTierToolItem":{"properties":{"tool_id":{"type":"string","title":"Tool Id","description":"A tool id from the tools catalogue."},"included":{"type":"boolean","title":"Included","description":"Whether the tier unlocks this tool."}},"type":"object","required":["tool_id","included"],"title":"AdminTierToolItem","description":"One gated-tool template row."},"AdminTierToolResponse":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"included":{"type":"boolean","title":"Included"}},"type":"object","required":["tool_id","included"],"title":"AdminTierToolResponse"},"AdminTierToolsRequest":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/AdminTierToolItem"},"type":"array","title":"Tools"}},"type":"object","required":["tools"],"title":"AdminTierToolsRequest","description":"PUT /admin/tiers/{code}/tools — replace the whole gated-tool template."},"AdminTierUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rank":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rank"},"price_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Amount"},"currency":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Currency"},"max_users":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Users"},"is_billable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Billable"},"stripe_price_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Price Id"},"stripe_product_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Stripe Product Id"}},"type":"object","title":"AdminTierUpdateRequest","description":"PATCH /admin/tiers/{code} — change a tier.\n\nEvery field is optional and only the fields present in the body are written,\nso a null is an explicit \"clear this column\" rather than \"leave it alone\".\n``code`` is absent on purpose: it is the key organisations point at, so\nrenaming it would orphan them. Activation has its own endpoint."},"AgentBadgeNode":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"tool_name":{"type":"string","title":"Tool Name"},"execution_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Status"},"num_issues":{"type":"integer","title":"Num Issues","default":0},"total_tech_debt":{"type":"integer","title":"Total Tech Debt","default":0},"num_high_severity_issues":{"type":"integer","title":"Num High Severity Issues","default":0},"num_medium_severity_issues":{"type":"integer","title":"Num Medium Severity Issues","default":0},"num_low_severity_issues":{"type":"integer","title":"Num Low Severity Issues","default":0},"num_scanned_elements":{"type":"integer","title":"Num Scanned Elements","default":0},"rules_with_findings":{"type":"integer","title":"Rules With Findings","default":0},"rules_in_catalog":{"type":"integer","title":"Rules In Catalog","default":0}},"type":"object","required":["tool_id","tool_name"],"title":"AgentBadgeNode"},"AgentBuiltToolInfo":{"properties":{"build_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Instructions"},"num_rules":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Rules"},"impact_areas":{"items":{"$ref":"#/components/schemas/ImpactAreaInfo"},"type":"array","title":"Impact Areas","default":[]},"files_whitelist":{"items":{"type":"string"},"type":"array","title":"Files Whitelist","default":[]}},"type":"object","title":"AgentBuiltToolInfo"},"AgentCascadePreviewResponse":{"properties":{"total_affected":{"type":"integer","minimum":0.0,"title":"Total Affected"},"breakdown_by_scope":{"additionalProperties":{"type":"integer"},"type":"object","title":"Breakdown By Scope"},"already_local":{"items":{"$ref":"#/components/schemas/AlreadyLocalItemResponse"},"type":"array","title":"Already Local"}},"type":"object","required":["total_affected","breakdown_by_scope","already_local"],"title":"AgentCascadePreviewResponse","description":"Dry-run impact of propagating an add to descendant fork profiles."},"AgentFeatureApiItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name"],"title":"AgentFeatureApiItem","description":"agent_features slice in tool list responses."},"AgentFeatureSummaryResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name"],"title":"AgentFeatureSummaryResponse","description":"One agent_feature row exposed under include=agent_features."},"AgentLinkOrigin":{"type":"string","enum":["local","inherited"],"title":"AgentLinkOrigin","description":"Whether the agent was directly attached or inherited from a parent."},"AgentLinkResponse":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"origin":{"type":"string","title":"Origin"}},"type":"object","required":["tool_id","origin"],"title":"AgentLinkResponse","description":"A single tool link on a stack profile."},"AgentRowResponse":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model the client reported; null is 'Model not reported'"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Version the client reported, if any"},"client":{"type":"string","title":"Client"},"checks":{"type":"integer","title":"Checks"},"issues_found":{"type":"integer","title":"Issues Found"},"fixes_reported":{"type":"integer","title":"Fixes Reported","description":"Fixes reported by agent for this row's issues"},"fix_rate_reported_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fix Rate Reported Pct","description":"fixes_reported ÷ issues_found, %; null when no issue was found"}},"type":"object","required":["client","checks","issues_found","fixes_reported"],"title":"AgentRowResponse","description":"One row of Agent performance (functional §7.4)."},"AgentTotalsResponse":{"properties":{"issues_found":{"type":"integer","title":"Issues Found","description":"Equals card 3"},"fixes_reported":{"type":"integer","title":"Fixes Reported","description":"Equals card 4"}},"type":"object","required":["issues_found","fixes_reported"],"title":"AgentTotalsResponse"},"AlreadyLocalItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"}},"type":"object","required":["id","name","scope_type"],"title":"AlreadyLocalItemResponse","description":"Descendant profile that already has the tool as local."},"AnalyticsActivity":{"properties":{"ever_live_checked":{"type":"boolean","title":"Ever Live Checked","description":"The organisation has at least one live check, at any date"},"ever_committed":{"type":"boolean","title":"Ever Committed","description":"The organisation has at least one committed file, at any date"},"awaiting_first_coverage":{"type":"boolean","title":"Awaiting First Coverage","description":"At least one repository has completed a full scan and still has no committed file. The first scan of a repository records nothing, so coverage begins at its second scan (functional spec §5.3.8) — which is why `ever_committed` can be false for an organisation that is correctly set up and simply has not been scanned twice yet. The screen uses it to explain the wait instead of asking for a setup step that is already done.","default":false},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At","description":"The more recent of the two, UTC; null when the organisation has neither. The screen names this date when the selected period is the reason a block is empty."},"by_repository":{"additionalProperties":{"type":"string","format":"date-time"},"type":"object","title":"By Repository","description":"Repository id -> when that repository last produced anything, UTC and unbounded by the period. A repository that has never produced anything is absent from the map rather than null, because 'never' and 'not in this window' need different sentences on the screen. Sent whole rather than per selection: the period and the repository are the only two filters that can empty the coverage blocks, and an organisation has tens of repositories, so one map costs less than a request each time the reader changes the selection."}},"type":"object","required":["ever_live_checked","ever_committed"],"title":"AnalyticsActivity","description":"Whether this organisation has ever produced analytics data at all.\n\nUnbounded by the period and by every filter, which is the whole point: it is\nwhat lets the screen say \"Norma has not seen anything yet\" and \"there is\ndata, just not in this window\" instead of showing the same dashes for both."},"AnalyticsSettingsResponse":{"properties":{"analytics_team_view":{"type":"boolean","title":"Analytics Team View","description":"When true, every member of the organisation sees all developer rows on the Analytics screen. When false, a non-admin sees only their own."}},"type":"object","required":["analytics_team_view"],"title":"AnalyticsSettingsResponse","description":"What the organisation has decided about the Analytics screen."},"AnalyticsSettingsWithActivityResponse":{"properties":{"analytics_team_view":{"type":"boolean","title":"Analytics Team View","description":"When true, every member of the organisation sees all developer rows on the Analytics screen. When false, a non-admin sees only their own."},"coverage_warning_threshold":{"type":"integer","title":"Coverage Warning Threshold","description":"Merge scans tables flag a row whose share checked before merge is below this percentage. Deployment configuration (ANALYTICS_COVERAGE_WARNING_THRESHOLD, default 30); read-only (QSA-1842)."},"activity":{"$ref":"#/components/schemas/AnalyticsActivity"}},"type":"object","required":["analytics_team_view","coverage_warning_threshold","activity"],"title":"AnalyticsSettingsWithActivityResponse","description":"Body of GET /analytics/v1/settings — the settings plus the activity."},"ApiKeyListItem":{"properties":{"api_key_id":{"type":"string","title":"Api Key Id"},"target_type":{"type":"string","enum":["repository","connection"],"title":"Target Type","default":"repository"},"repository_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repository Id"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"repository_name":{"type":"string","title":"Repository Name","default":""},"repository_url":{"type":"string","title":"Repository Url","default":""},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"last_four":{"type":"string","title":"Last Four"},"mcp_connections":{"items":{"$ref":"#/components/schemas/McpConnectionItem"},"type":"array","title":"Mcp Connections"}},"additionalProperties":false,"type":"object","required":["api_key_id","expires_at","created_at","is_revoked","last_four"],"title":"ApiKeyListItem","description":"API key con datos de repository o connection y mcp_connections (GET /api-keys)."},"ApiKeyMcpBody":{"properties":{"repository_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Repository Id"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"target_type":{"anyOf":[{"type":"string","enum":["repository","connection"]},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"integer"},{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"ApiKeyMcpBody","description":"Cuerpo para crear MCP key: ``target_type`` + ``target_id`` o legado ``repository_id`` / ``connection_id``."},"ApiKeyMetadataResponse":{"properties":{"id":{"type":"string","title":"Id"},"last_four":{"type":"string","title":"Last Four"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_revoked":{"type":"boolean","title":"Is Revoked"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","last_four","expires_at","created_at","is_revoked"],"title":"ApiKeyMetadataResponse"},"AssignOrgUserRoleRequest":{"properties":{"role_name":{"type":"string","title":"Role Name","description":"Name of the role to assign (e.g. 'org_admin')."},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id","description":"Opaque resource identifier for project- or workspace-scoped assignments. Leave empty for org-level roles."}},"type":"object","required":["role_name"],"title":"AssignOrgUserRoleRequest","description":"Request body for POST /orgs/{org_id}/users/{user_id}/roles."},"AssignRepositoryWorkspaceRequest":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"}},"type":"object","required":["workspace_id"],"title":"AssignRepositoryWorkspaceRequest","description":"Request body for PUT /repositories/{repo_id}/workspace."},"AssignRulesToRulesetInput":{"properties":{"ruleset_version_id":{"type":"string","title":"Ruleset Version Id"},"rules_ids":{"items":{"type":"string"},"type":"array","title":"Rules Ids"}},"type":"object","required":["ruleset_version_id","rules_ids"],"title":"AssignRulesToRulesetInput"},"AssignToolsToRepositoryBody":{"properties":{"tool_ids":{"items":{"type":"string"},"type":"array","title":"Tool Ids"}},"type":"object","required":["tool_ids"],"title":"AssignToolsToRepositoryBody"},"AssignWorkspaceUserRoleRequest":{"properties":{"role_name":{"type":"string","title":"Role Name","description":"Name of the role to assign (e.g. 'workspace_owner'). Roles with org scope are rejected at this endpoint."},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id","description":"Opaque resource identifier for project-scoped assignments within the workspace. Leave empty for workspace-level roles."}},"type":"object","required":["role_name"],"title":"AssignWorkspaceUserRoleRequest","description":"Request body for POST /workspaces/{workspace_id}/users/{user_id}/roles."},"AssignedRoleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","title":"User Id"},"role_id":{"type":"string","format":"uuid","title":"Role Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","role_id","org_id","resource_id","created_at"],"title":"AssignedRoleResponse","description":"Response body for a successful role assignment (201 Created)."},"AssignedWorkspaceRoleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","title":"User Id"},"role_id":{"type":"string","format":"uuid","title":"Role Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","role_id","org_id","workspace_id","resource_id","created_at"],"title":"AssignedWorkspaceRoleResponse","description":"Response body for a successful workspace role assignment (201 Created)."},"AssociateTargetsToStackProfileBody":{"properties":{"target_ids":{"items":{"type":"string"},"type":"array","title":"Target Ids"}},"type":"object","required":["target_ids"],"title":"AssociateTargetsToStackProfileBody"},"AssociateTargetsToStackProfileResponse":{"properties":{"associated_target_ids":{"items":{"type":"string"},"type":"array","title":"Associated Target Ids"}},"type":"object","required":["associated_target_ids"],"title":"AssociateTargetsToStackProfileResponse"},"AssociateTargetsToToolBody":{"properties":{"target_ids":{"items":{"type":"string"},"type":"array","title":"Target Ids","description":"Lista de IDs de targets a asociar"}},"type":"object","required":["target_ids"],"title":"AssociateTargetsToToolBody"},"AssociateTargetsToToolResponse":{"properties":{"associated_target_ids":{"items":{"type":"string"},"type":"array","title":"Associated Target Ids","description":"Lista de IDs de targets asociados exitosamente"}},"type":"object","required":["associated_target_ids"],"title":"AssociateTargetsToToolResponse"},"AttachAgentRequest":{"properties":{"tool_id":{"type":"string","title":"Tool Id"}},"type":"object","required":["tool_id"],"title":"AttachAgentRequest","description":"Request body for POST /api/v1/stack-profiles/{profile_id}/agents."},"AutodiscoveryEvidencesNode":{"properties":{"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification","description":"Justificación legible de por qué se detectó este target"}},"type":"object","title":"AutodiscoveryEvidencesNode","description":"Metadata de evidencias de autodiscovery para un target."},"AutodiscoveryStatusSummaryResponse":{"properties":{"repository_id":{"type":"string","title":"Repository Id"},"execution_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Id"},"status":{"type":"string","enum":["NOT_FOUND","RUNNING","SUCCESS","FAIL"],"title":"Status","description":"NOT_FOUND: no execution recorded yet. SUCCESS: the stack targets are linked and their rulesets attached."},"progress":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Progress"}},"type":"object","required":["repository_id","status","progress"],"title":"AutodiscoveryStatusSummaryResponse","description":"Status of a repository's latest autodiscovery execution."},"AvailableStackProfileItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"},"scope_badge":{"type":"string","title":"Scope Badge"},"is_default":{"type":"boolean","title":"Is Default"},"agent_count":{"type":"integer","title":"Agent Count"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["id","name","scope_type","scope_badge","is_default","agent_count"],"title":"AvailableStackProfileItemResponse","description":"Single stack profile item in the picker list."},"AvailableStackProfilesPageResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AvailableStackProfileItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"AvailableStackProfilesPageResponse","description":"Paginated response for GET /tools/v1/stack-profiles/available."},"BadgeNode":{"properties":{"state":{"type":"string","title":"State","default":"certified"},"label":{"type":"string","title":"Label","default":"CERTIFIED"},"tone":{"type":"string","title":"Tone","default":"success"}},"type":"object","title":"BadgeNode"},"BaseToolScopeResponse":{"properties":{"scope_type":{"$ref":"#/components/schemas/ScopeType"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","required":["scope_type"],"title":"BaseToolScopeResponse","description":"Scope row from base_tools (tool_id FK) for API consumers."},"BillingPortalRequest":{"properties":{"return_url":{"type":"string","title":"Return Url"}},"type":"object","required":["return_url"],"title":"BillingPortalRequest"},"BillingPortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"BillingPortalResponse"},"BillingStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"},"will_cancel":{"type":"boolean","title":"Will Cancel","default":false},"effective_cancellation_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective Cancellation Date"},"renewal_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Renewal Date"}},"type":"object","required":["status","current_period_end","grace_period_ends_at"],"title":"BillingStatusResponse","description":"Optional billing state block; only returned to org_admin for the requested org."},"BuildFrameworkRulesBody":{"properties":{"target_key":{"type":"string","title":"Target Key"},"repository_id":{"type":"string","title":"Repository Id"},"framework_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Framework Version","default":"latest"},"num_rules_to_build":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Rules To Build","default":30},"build_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Instructions"},"impact_areas_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Impact Areas Ids"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"ce_type_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ce Type Ids"},"agent_feature_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Agent Feature Ids"},"stack_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stack Profile Id"},"files_whitelist":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Files Whitelist","description":"Restrict all generated rules to these glob path patterns. Examples: 'src/controllers/**/*.php', 'app/Http/**', '**/*Service.py'. Uses forward slashes and standard glob wildcards (* = single level, ** = recursive). Leave empty or null to let the LLM decide per rule."}},"type":"object","required":["target_key","repository_id"],"title":"BuildFrameworkRulesBody","description":"HTTP body for building framework rules endpoint.\n\nAttributes:\n    target_key: Framework target key (e.g., \"laravel\", \"flask\")\n    repository_id: Repository identifier\n    framework_version: Framework version (optional, defaults to \"latest\")\n    num_rules_to_build: Number of rules to generate (optional, default 30)\n    build_instructions: Optional user instructions for the prompt\n    impact_areas_ids: Optional list of impact area IDs to constrain categories\n    tool_name: Optional custom name to derive tool_id from (avoids unique key when creating\n        multiple tools for the same target)\n    ce_type_ids: Optional explicit ce_types (None = LLM chooses from catalog)\n    agent_feature_ids: Optional explicit agent_features (None = LLM chooses)\n    stack_profile_id: Optional curated profile to copy scope from (build v2)"},"BuildFrameworkRulesRebuildBody":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"repository_id":{"type":"string","title":"Repository Id"},"framework_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Framework Version","default":"latest"},"num_rules_to_build":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Rules To Build","default":30},"build_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Instructions"},"impact_areas_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Impact Areas Ids"},"tool_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"},"ce_type_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ce Type Ids"},"agent_feature_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Agent Feature Ids"},"stack_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stack Profile Id"},"files_whitelist":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Files Whitelist","description":"Force all generated rules to target only these glob path patterns."}},"type":"object","required":["tool_id","repository_id"],"title":"BuildFrameworkRulesRebuildBody","description":"HTTP body for rebuilding framework rules from an existing tool.\n\nIdentical to BuildFrameworkRulesBody but uses tool_id instead of target_key.\nThe target_key is resolved internally from the existing tool.\n\nAttributes:\n    tool_id: ID of the existing tool to rebuild\n    repository_id: Repository identifier\n    framework_version: Framework version (optional, defaults to \"latest\")\n    num_rules_to_build: Number of rules to generate (optional, default 30)\n    build_instructions: Optional user instructions for the prompt\n    impact_areas_ids: Optional list of impact area IDs to constrain categories\n    ce_type_ids: Optional explicit ce_types (None = LLM chooses)\n    agent_feature_ids: Optional explicit agent_features (None = LLM chooses)"},"BuildFrameworkRulesResponse":{"properties":{"status":{"type":"string","const":"success","title":"Status","default":"success"},"message":{"type":"string","title":"Message"},"rules_path":{"type":"string","title":"Rules Path"},"tool_id":{"type":"string","title":"Tool Id"}},"type":"object","required":["message","rules_path","tool_id"],"title":"BuildFrameworkRulesResponse","description":"Response for building framework rules.\n\nAttributes:\n    status: Status of the operation (always \"success\")\n    message: Human-readable message describing the result\n    rules_path: Path where the rules JSON file was saved\n    tool_id: ID of the tool created in database"},"BuildFrameworkRulesV2Response":{"properties":{"status":{"type":"string","const":"accepted","title":"Status","default":"accepted"},"message":{"type":"string","title":"Message"},"tool_id":{"type":"string","title":"Tool Id"}},"type":"object","required":["message","tool_id"],"title":"BuildFrameworkRulesV2Response","description":"HTTP 202 Accepted response for the async build endpoint.\n\nAttributes:\n    status: Always \"accepted\" to indicate the request has been queued.\n    message: Human-readable confirmation message.\n    tool_id: Deterministic ID of the tool that will be persisted. Clients can\n             use this to poll status or trigger actions once the build completes."},"BuildRuleBody":{"properties":{"tool_id":{"type":"string","minLength":1,"title":"Tool Id"},"rule_name":{"type":"string","minLength":1,"title":"Rule Name"},"instructions":{"type":"string","minLength":1,"title":"Instructions"},"repository_id":{"type":"string","minLength":1,"title":"Repository Id"}},"type":"object","required":["tool_id","rule_name","instructions","repository_id"],"title":"BuildRuleBody","description":"HTTP body for building a single rule via LLM."},"BuildRuleIssue":{"properties":{"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","description":"File path relative to repo root"},"line_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Number"},"code_snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Snippet","description":"Code line or snippet"},"message":{"type":"string","title":"Message","description":"Issue message"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Id"}},"type":"object","required":["message"],"title":"BuildRuleIssue","description":"Issue shape aligned with tool output and issues API (subset of enriched issue)."},"BuildRuleResponse":{"properties":{"rule":{"$ref":"#/components/schemas/RuleItemResponse"},"issues":{"items":{"$ref":"#/components/schemas/BuildRuleIssue"},"type":"array","title":"Issues"}},"type":"object","required":["rule","issues"],"title":"BuildRuleResponse","description":"Response: persisted rule (same shape as GET .../rules/for-tool) + scan issues."},"CeTypeApiItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"platform_id":{"type":"string","title":"Platform Id"}},"type":"object","required":["id","name","platform_id"],"title":"CeTypeApiItem","description":"ce_types slice in tool list responses."},"ChangeStackProfileRequest":{"properties":{"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id"}},"type":"object","required":["stack_profile_id"],"title":"ChangeStackProfileRequest"},"ChangeStackProfileResponse":{"properties":{"repository_id":{"type":"string","title":"Repository Id","description":"Repository identifier"},"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id","description":"New project fork stack_profile id"},"locked_at":{"type":"string","format":"date-time","title":"Locked At"},"locked_reason":{"type":"string","title":"Locked Reason"},"is_stack_profile_selectable":{"type":"boolean","title":"Is Stack Profile Selectable","description":"Always false after successful change (repository is locked).","default":false}},"type":"object","required":["repository_id","stack_profile_id","locked_at","locked_reason"],"title":"ChangeStackProfileResponse"},"CheckoutSessionRequest":{"properties":{"tier":{"type":"string","title":"Tier"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["tier","success_url","cancel_url"],"title":"CheckoutSessionRequest"},"CheckoutSessionResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutSessionResponse"},"ComplianceControlResponse":{"properties":{"standard_code":{"type":"string","title":"Standard Code"},"standard_name":{"type":"string","title":"Standard Name"},"control_code":{"type":"string","title":"Control Code"},"control_title":{"type":"string","title":"Control Title"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["standard_code","standard_name","control_code","control_title"],"title":"ComplianceControlResponse"},"ConnectionDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"org_uuid":{"type":"string","title":"Org Uuid"},"user_uuid":{"type":"string","title":"User Uuid"},"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id"},"lifecycle":{"$ref":"#/components/schemas/ConnectionLifecycleResponse"},"stack_profile":{"$ref":"#/components/schemas/StackProfileResponse","description":"Linked curated stack profile (catalogue row)."},"api_keys":{"items":{"$ref":"#/components/schemas/ApiKeyMetadataResponse"},"type":"array","title":"Api Keys","description":"MCP keys bound to this connection; never includes plaintext."}},"type":"object","required":["id","name","description","org_uuid","user_uuid","stack_profile_id","lifecycle","stack_profile"],"title":"ConnectionDetailResponse"},"ConnectionLifecycleResponse":{"properties":{"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"}},"type":"object","required":["created_at","updated_at"],"title":"ConnectionLifecycleResponse"},"ConnectionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"org_uuid":{"type":"string","title":"Org Uuid"},"user_uuid":{"type":"string","title":"User Uuid"},"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id"},"lifecycle":{"$ref":"#/components/schemas/ConnectionLifecycleResponse"}},"type":"object","required":["id","name","description","org_uuid","user_uuid","stack_profile_id","lifecycle"],"title":"ConnectionResponse"},"CountIssuesResponse":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count","description":"Total de issues que cumplen los filtros especificados","examples":[42,128,0]},"sum_tech_debt":{"type":"integer","minimum":0.0,"title":"Sum Tech Debt","description":"Suma del estimated_time_to_fix de los issues contabilizados (en minutos)","examples":[360,1200,0]},"by_severity_and_impact_area":{"anyOf":[{"items":{"$ref":"#/components/schemas/SeverityImpactAreaCount"},"type":"array"},{"type":"null"}],"title":"By Severity And Impact Area","description":"Desglose por (severity, impact_area), solo presente cuando se solicita include_severity_impact_breakdown=true (usado por get_open_issues, QSA-1539)."}},"type":"object","required":["count","sum_tech_debt"],"title":"CountIssuesResponse","description":"Response para count de issues con suma de tech debt."},"CountRulesResponse":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count","description":"Total de rules con issues que cumplen los filtros especificados","examples":[42,128,0]}},"type":"object","required":["count"],"title":"CountRulesResponse","description":"Response para count de rules."},"CreateConnectionRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","stack_profile_id"],"title":"CreateConnectionRequest"},"CreateCuratedStackProfileBody":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","required":["name"],"title":"CreateCuratedStackProfileBody","description":"Request body for POST /tools/v1/curated-stack-profiles."},"CreateRolePermissionRequest":{"properties":{"role_name":{"type":"string","title":"Role Name","description":"Canonical role name (e.g. 'org_admin')."},"action":{"type":"string","title":"Action","description":"Action string to grant (e.g. 'repo:view')."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description of the grant."}},"type":"object","required":["role_name","action"],"title":"CreateRolePermissionRequest","description":"Request body for POST /admin/role-permissions (req 5)."},"CreateRulesetInput":{"properties":{"ruleset_version_id":{"type":"string","title":"Ruleset Version Id"},"name":{"type":"string","title":"Name"},"launch_date":{"type":"string","title":"Launch Date"},"tool_id":{"type":"string","title":"Tool Id"}},"type":"object","required":["ruleset_version_id","name","launch_date","tool_id"],"title":"CreateRulesetInput"},"CreateScanScheduleRequest":{"properties":{"repository_id":{"type":"string","minLength":1,"title":"Repository Id"},"frequency_weeks":{"type":"integer","maximum":52.0,"minimum":1.0,"title":"Frequency Weeks","description":"Recurrence interval in weeks (1–52)."},"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week","description":"Day of the week: 0 = Monday, 1 = Tuesday, …, 6 = Sunday."},"local_time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","title":"Local Time","description":"Time of day in HH:MM format (24-hour clock, 00:00–23:59), e.g. '09:00', '14:30'."},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone identifier, e.g. 'Europe/Madrid', 'America/New_York', 'UTC'. Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"}},"type":"object","required":["repository_id","frequency_weeks","day_of_week","local_time","timezone"],"title":"CreateScanScheduleRequest"},"CreateStackProfileBody":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","version"],"title":"CreateStackProfileBody"},"CreateStackProfileRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"is_default":{"type":"boolean","title":"Is Default","default":false},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","required":["name","scope_type"],"title":"CreateStackProfileRequest","description":"Request body for POST /api/v1/stack-profiles."},"CreateStackProfileResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","version"],"title":"CreateStackProfileResponse"},"CreateStackTargetBody":{"properties":{"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["layer","target_key","target_name"],"title":"CreateStackTargetBody"},"CreateStackTargetResponse":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"CreateStackTargetResponse"},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Name of the workspace. Must be unique within the organisation."}},"type":"object","required":["name"],"title":"CreateWorkspaceRequest","description":"Request body for POST /orgs/{org_id}/workspaces."},"CuratedRepositoryTargetAutodiscovery":{"properties":{"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification"}},"type":"object","title":"CuratedRepositoryTargetAutodiscovery"},"CuratedRepositoryTargetItem":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tools_metadata":{"anyOf":[{"$ref":"#/components/schemas/CuratedRepositoryTargetToolsMetadata"},{"type":"null"}]},"autodiscovery_evidences":{"anyOf":[{"$ref":"#/components/schemas/CuratedRepositoryTargetAutodiscovery"},{"type":"null"}]},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/CuratedRepositoryTargetTool"},"type":"array"},{"type":"null"}],"title":"Tools"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"CuratedRepositoryTargetItem"},"CuratedRepositoryTargetTool":{"additionalProperties":true,"type":"object"},"CuratedRepositoryTargetToolsMetadata":{"properties":{"count_stack_profile_active_agents":{"type":"integer","minimum":0.0,"title":"Count Stack Profile Active Agents"},"count_available_agents":{"type":"integer","minimum":0.0,"title":"Count Available Agents"}},"type":"object","required":["count_stack_profile_active_agents","count_available_agents"],"title":"CuratedRepositoryTargetToolsMetadata"},"CuratedStackProfileNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","required":["id","name","scope_type","is_default","created_at","updated_at"],"title":"CuratedStackProfileNode","description":"Curated stack_profiles row bound via repositories.stack_profile_id."},"CuratedStackProfileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","required":["id","name","scope_type","is_default","created_at","updated_at"],"title":"CuratedStackProfileResponse","description":"Response body for a single curated stack profile."},"CursorDirection":{"type":"string","enum":["next","prev","last"],"title":"CursorDirection"},"DeleteUserRequest":{"properties":{"user_id_confirmation":{"type":"string","title":"User Id Confirmation","description":"Must match the user_id path parameter exactly (case-sensitive)"},"acknowledged":{"type":"boolean","title":"Acknowledged","description":"Must be true to confirm irreversible deletion"}},"type":"object","required":["user_id_confirmation","acknowledged"],"title":"DeleteUserRequest","description":"Strong confirmation required before deleting a user."},"DeleteUserResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"DeleteUserResponse","description":"Result of user deletion.\n\nNothing here about the Keycloak account: repo-inspector removes it after\nanswering, so its fate is not known when this response is built."},"EndpointModule":{"type":"string","enum":["orchestrator","tools","rules","issues","public"],"title":"EndpointModule","description":"Logical API module derived from path_pattern prefixes.\n\nMaps to the router mount prefixes defined in main.py:\n  orchestrator → /api/v*\n  tools        → /tools/v*\n  rules        → /rules/v*\n  issues       → /issues/v*\n  public       → paths without a versioned prefix (/, /health, /docs, etc.)"},"EndpointPermissionAdminResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"http_method":{"type":"string","title":"Http Method"},"path_pattern":{"type":"string","title":"Path Pattern"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"resource_extractor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Extractor"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","http_method","path_pattern","action","resource_type","resource_extractor","description","is_active","updated_at"],"title":"EndpointPermissionAdminResponse","description":"Response schema for a single endpoint_permissions row (req 1, req 5).\n\nupdated_at is included to allow optimistic concurrency checking in the\nadmin UI: the UI must send this value back in PUT requests as\nexpected_updated_at to detect concurrent modifications."},"EndpointPermissionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EndpointPermissionAdminResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"EndpointPermissionListResponse","description":"Paginated response schema for GET /admin/endpoint-permissions (req 1)."},"EnrichedIssueResponse":{"properties":{"id":{"type":"string","title":"Id"},"line_number":{"type":"integer","title":"Line Number"},"detection_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detection Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"code_snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Snippet"},"rule":{"$ref":"#/components/schemas/RuleResponse"},"tool":{"anyOf":[{"$ref":"#/components/schemas/issues_api__src__infrastructure__controllers__issues_controller__ToolResponse"},{"type":"null"}]},"scanned_element":{"$ref":"#/components/schemas/ScannedElementResponse"},"scanned_code_units":{"items":{"$ref":"#/components/schemas/ScannedCodeUnitResponse"},"type":"array","title":"Scanned Code Units"}},"type":"object","required":["id","line_number","rule","scanned_element","scanned_code_units"],"title":"EnrichedIssueResponse"},"ExceptionResponse":{"properties":{"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","title":"ExceptionResponse","description":"Schema used to describe an exception response"},"ExternalToolPayload":{"additionalProperties":true,"type":"object"},"ExternalToolRuleInput":{"properties":{"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"file_extensions":{"items":{"type":"string"},"type":"array","title":"File Extensions"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"is_common":{"type":"boolean","title":"Is Common","default":false},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"file_extensions_ids":{"items":{"type":"string"},"type":"array","title":"File Extensions Ids","default":[]},"path_patterns":{"items":{"type":"string"},"type":"array","title":"Path Patterns","default":[]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},"type":"object","required":["rule_slug","version","name","description","severity","impact_area","estimated_time_to_fix","platforms","ce_types","file_extensions","repository_ids","org_uuids","payload"],"title":"ExternalToolRuleInput"},"ExternalToolRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"payload":{"$ref":"#/components/schemas/ExternalToolPayload"},"is_common":{"type":"boolean","title":"Is Common"}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area","ce_types","platforms","repository_ids","org_uuids","payload","is_common"],"title":"ExternalToolRuleResponse"},"ExternalToolRulesBatchInput":{"properties":{"rules":{"items":{"$ref":"#/components/schemas/ExternalToolRuleInput"},"type":"array","maxItems":200,"minItems":1,"title":"Rules","description":"Lista de reglas external-tool a crear"}},"type":"object","required":["rules"],"title":"ExternalToolRulesBatchInput","description":"Input model para el endpoint batch de reglas external-tool."},"ExternalToolRulesBatchResponse":{"properties":{"total_requested":{"type":"integer","title":"Total Requested","description":"Total de reglas solicitadas"},"created":{"type":"integer","title":"Created","description":"Reglas creadas exitosamente"},"skipped":{"type":"integer","title":"Skipped","description":"Reglas que ya existían"},"failed":{"type":"integer","title":"Failed","description":"Reglas que fallaron"},"results":{"items":{"$ref":"#/components/schemas/RuleCreationResult"},"type":"array","title":"Results","description":"Detalle de cada regla procesada"}},"type":"object","required":["total_requested","created","skipped","failed","results"],"title":"ExternalToolRulesBatchResponse","description":"Respuesta del endpoint batch con estadísticas agregadas y resultados detallados.\n\nPrincipio SOLID: OCP - Open/Closed Principle.\nExtensible para agregar nuevas métricas sin modificar la estructura base."},"FilterItemResponse":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"}},"type":"object","required":["key","value"],"title":"FilterItemResponse"},"FilterResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/FilterItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["id","name","total","items"],"title":"FilterResponse"},"ForkStackProfileBody":{"properties":{"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","title":"ForkStackProfileBody","description":"Request body for forking a stack profile into a target scope."},"ForkStackProfileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"},"agents":{"items":{"$ref":"#/components/schemas/AgentLinkResponse"},"type":"array","title":"Agents","default":[]}},"type":"object","required":["id","name","scope_type","is_default","created_at","updated_at"],"title":"ForkStackProfileResponse","description":"Response body for a forked stack profile, including its agents."},"FunctionalSummaryItem":{"properties":{"module_name":{"type":"string","title":"Module Name"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["module_name","summary"],"title":"FunctionalSummaryItem","description":"Item de resumen funcional (módulos de negocio)."},"GetReferralInfoResponse":{"properties":{"status":{"type":"string","title":"Status"},"inviter_name":{"type":"string","title":"Inviter Name"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["status","inviter_name","expires_at"],"title":"GetReferralInfoResponse"},"GetRepositoryByIdResponse":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"is_stack_profile_selectable":{"type":"boolean","title":"Is Stack Profile Selectable"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"stack_profile_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Profile Name"},"total_scanned_elements":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Scanned Elements"},"tools_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolMetricNode"},"type":"array"},{"type":"null"}],"title":"Tools Metrics"},"scan_status":{"anyOf":[{"items":{"$ref":"#/components/schemas/ScanStatusNode"},"type":"array"},{"type":"null"}],"title":"Scan Status"},"last_success_scan_status":{"anyOf":[{"items":{"$ref":"#/components/schemas/ScanStatusNode"},"type":"array"},{"type":"null"}],"title":"Last Success Scan Status"},"target_metrics":{"anyOf":[{"items":{"$ref":"#/components/schemas/TargetMetricNode"},"type":"array"},{"type":"null"}],"title":"Target Metrics"},"active_schedule":{"anyOf":[{"$ref":"#/components/schemas/ActiveScheduleNode"},{"type":"null"}]},"agent_metrics":{"anyOf":[{"$ref":"#/components/schemas/tools_api__src__application__responses__get_repository_by_id_response__AgentMetricsNode"},{"type":"null"}]}},"type":"object","required":["name","url","is_stack_profile_selectable"],"title":"GetRepositoryByIdResponse"},"GetStackProfileByIdResponse":{"properties":{"stack_profile":{"anyOf":[{"$ref":"#/components/schemas/tools_api__src__application__responses__get_stack_profile_by_id_response__StackProfileItem"},{"type":"null"}]}},"type":"object","title":"GetStackProfileByIdResponse"},"GetTargetsByCuratedRepositoryResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/CuratedRepositoryTargetItem"},"type":"array","title":"Targets"}},"type":"object","required":["targets"],"title":"GetTargetsByCuratedRepositoryResponse"},"GetTargetsByStackProfileResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/tools_api__src__application__responses__get_targets_by_stack_profile_response__StackTargetItem"},"type":"array","title":"Targets","description":"Lista de targets asociados al stack profile"}},"type":"object","required":["targets"],"title":"GetTargetsByStackProfileResponse","description":"Response DTO for getting targets associated with a stack profile."},"GetToolsByTargetResponse":{"properties":{"tools":{"items":{"$ref":"#/components/schemas/ToolByTargetResponse"},"type":"array","title":"Tools","description":"Lista de tools asociados al target"}},"type":"object","required":["tools"],"title":"GetToolsByTargetResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HardFailNode":{"properties":{"triggered":{"type":"boolean","title":"Triggered"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"failing_areas":{"items":{"type":"string"},"type":"array","title":"Failing Areas"}},"type":"object","required":["triggered"],"title":"HardFailNode","description":"The release gate, plus the areas that fail their own measurement (QSA-1319).\n\n``triggered`` fires only on a QC Security Floor violation. It no longer forces\nthe tier: the Floor caps the score at the top of CONDITIONAL instead, and the\ntier follows the capped score. ``failing_areas`` lists the areas scoring under\n60 — information about the measurement, which gates nothing on its own.\n\nThe name is kept for the API contract; a rename needs frontend coordination."},"ImpactAreaInfo":{"properties":{"impact_area_id":{"type":"string","title":"Impact Area Id"},"impact_area_name":{"type":"string","title":"Impact Area Name"}},"type":"object","required":["impact_area_id","impact_area_name"],"title":"ImpactAreaInfo"},"ImpactAreaScoreNode":{"properties":{"impact_area_id":{"type":"string","title":"Impact Area Id"},"impact_area_name":{"type":"string","title":"Impact Area Name"},"weight":{"type":"integer","title":"Weight"},"area_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Area Score","description":"Area score, 0 to 100. Under formula v3 it is 100*exp(-(k_area*findings/KLOC + c_high*high_findings)): finding density for the size of the repository, plus an absolute cost per HIGH finding that the size cannot dilute. An area with any finding never reports 100. Null when the area has no configured rules."},"agents":{"type":"integer","title":"Agents"},"rules":{"type":"integer","title":"Rules"},"severity":{"$ref":"#/components/schemas/SeverityBreakdownNode"},"fail":{"type":"boolean","title":"Fail","description":"The area scores under 60. A signal about this area only — the release gate is production_ready.hard_fail.","default":false}},"type":"object","required":["impact_area_id","impact_area_name","weight","agents","rules"],"title":"ImpactAreaScoreNode"},"InheritanceChainNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"type":"string","title":"Scope Type"}},"type":"object","required":["id","name","scope_type"],"title":"InheritanceChainNode","description":"One node in the profile's ancestor chain (global → org → workspace …)."},"InheritedFromResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"type":"string","title":"Scope Type"}},"type":"object","required":["id","name","scope_type"],"title":"InheritedFromResponse","description":"Identifies the ancestor profile from which an agent was inherited."},"InsightsCeTypeItem":{"properties":{"ce_type_name":{"type":"string","title":"Ce Type Name"},"num_scanned_elements":{"type":"integer","title":"Num Scanned Elements"}},"type":"object","required":["ce_type_name","num_scanned_elements"],"title":"InsightsCeTypeItem","description":"Item de tipo de code element."},"InsightsCeTypes":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"items":{"items":{"$ref":"#/components/schemas/InsightsCeTypeItem"},"type":"array","title":"Items"}},"type":"object","required":["pagination","items"],"title":"InsightsCeTypes","description":"Sección de tipos de code element."},"InsightsGeneral":{"properties":{"metrics":{"$ref":"#/components/schemas/InsightsGeneralMetrics"}},"type":"object","required":["metrics"],"title":"InsightsGeneral","description":"Sección de insights generales."},"InsightsGeneralMetrics":{"properties":{"num_modules":{"type":"integer","title":"Num Modules"},"num_custom_tables":{"type":"integer","title":"Num Custom Tables"},"num_custom_fields":{"type":"integer","title":"Num Custom Fields"},"num_lines_of_code":{"type":"integer","title":"Num Lines Of Code"}},"type":"object","required":["num_modules","num_custom_tables","num_custom_fields","num_lines_of_code"],"title":"InsightsGeneralMetrics","description":"Métricas generales del repositorio."},"InsightsImpactArea":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InsightsImpactAreaItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InsightsImpactArea","description":"Sección de áreas de impacto."},"InsightsImpactAreaItem":{"properties":{"impact_area":{"type":"string","title":"Impact Area"},"num_issues":{"type":"integer","title":"Num Issues"}},"type":"object","required":["impact_area","num_issues"],"title":"InsightsImpactAreaItem","description":"Item de área de impacto."},"InsightsLanguageItem":{"properties":{"language_name":{"type":"string","title":"Language Name"},"metrics":{"additionalProperties":{"type":"number"},"type":"object","title":"Metrics"}},"type":"object","required":["language_name","metrics"],"title":"InsightsLanguageItem","description":"Métricas de un lenguaje dentro de una categoría."},"InsightsModuleItem":{"properties":{"module_name":{"type":"string","title":"Module Name"},"rankings":{"$ref":"#/components/schemas/ModuleRankings"},"metrics":{"additionalProperties":{"type":"integer"},"type":"object","title":"Metrics"},"insights_languages":{"items":{"$ref":"#/components/schemas/ModuleLanguageInsight"},"type":"array","title":"Insights Languages"}},"type":"object","required":["module_name","rankings","metrics","insights_languages"],"title":"InsightsModuleItem","description":"Item de módulo con rankings y métricas."},"InsightsModules":{"properties":{"pagination":{"$ref":"#/components/schemas/ModulesPaginationInfo"},"items":{"items":{"$ref":"#/components/schemas/InsightsModuleItem"},"type":"array","title":"Items"}},"type":"object","required":["pagination","items"],"title":"InsightsModules","description":"Sección de módulos con paginación."},"InsightsRuleItem":{"properties":{"rule_name":{"type":"string","title":"Rule Name"},"sum_time_to_fix":{"type":"number","title":"Sum Time To Fix"}},"type":"object","required":["rule_name","sum_time_to_fix"],"title":"InsightsRuleItem","description":"Item de regla."},"InsightsRules":{"properties":{"pagination":{"$ref":"#/components/schemas/PaginationInfo"},"items":{"items":{"$ref":"#/components/schemas/InsightsRuleItem"},"type":"array","title":"Items"}},"type":"object","required":["pagination","items"],"title":"InsightsRules","description":"Sección de reglas con paginación."},"InsightsSeverity":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InsightsSeverityItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InsightsSeverity","description":"Sección de severidades."},"InsightsSeverityItem":{"properties":{"severity":{"type":"string","title":"Severity"},"num_issues":{"type":"integer","title":"Num Issues"}},"type":"object","required":["severity","num_issues"],"title":"InsightsSeverityItem","description":"Item de severidad."},"InsightsToolsCategories":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InsightsToolsCategoryItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"InsightsToolsCategories","description":"Sección de categorías de herramientas."},"InsightsToolsCategoryItem":{"properties":{"category_name":{"type":"string","title":"Category Name"},"metrics":{"additionalProperties":{"type":"number"},"type":"object","title":"Metrics"},"insights_languages":{"items":{"$ref":"#/components/schemas/InsightsLanguageItem"},"type":"array","title":"Insights Languages"}},"type":"object","required":["category_name","metrics","insights_languages"],"title":"InsightsToolsCategoryItem","description":"Item de categoría de herramienta con sus métricas y lenguajes."},"InventoryNode":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","version"],"title":"InventoryNode","description":"Legacy tools-inventory snapshot linked to the repo (not curated stack_profiles)."},"InvitationOwnerRoleResponse":{"properties":{"org_owner_assigned":{"type":"boolean","title":"Org Owner Assigned"}},"type":"object","required":["org_owner_assigned"],"title":"InvitationOwnerRoleResponse"},"IssuesMetadataResponse":{"properties":{"num_issues":{"type":"integer","title":"Num Issues"},"sum_time_to_fix":{"type":"integer","title":"Sum Time To Fix"}},"type":"object","required":["num_issues","sum_time_to_fix"],"title":"IssuesMetadataResponse","description":"Metadata de issues asociados a una rule.\n\nSolo se incluye si include=issues_metadata en el request."},"LatestScanNode":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"status":{"type":"string","title":"Status"},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"error_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Details"},"error_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error On"}},"type":"object","required":["scan_id","status"],"title":"LatestScanNode"},"LinkedRepositoryItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id"],"title":"LinkedRepositoryItem","description":"A repository the connection's calls matched by their remote (QSA-1801)."},"ListMcpAppliedActionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/McpAppliedActionItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page_size":{"type":"integer","title":"Page Size"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","page_size","offset"],"title":"ListMcpAppliedActionsResponse"},"ListReferralsResponse":{"properties":{"referrals":{"items":{"$ref":"#/components/schemas/ReferralListItemResponse"},"type":"array","title":"Referrals"},"monthly_cap":{"type":"integer","title":"Monthly Cap"},"used_this_month":{"type":"integer","title":"Used This Month"}},"type":"object","required":["monthly_cap","used_this_month"],"title":"ListReferralsResponse"},"ListRepositoriesResponse":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/RepositoryItem"},"type":"array","title":"Repositories"}},"type":"object","required":["repositories"],"title":"ListRepositoriesResponse"},"ListStackProfilesResponse":{"properties":{"profiles":{"items":{"$ref":"#/components/schemas/tools_api__src__application__responses__list_stack_profiles_response__StackProfileItem"},"type":"array","title":"Profiles"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["profiles","total_count"],"title":"ListStackProfilesResponse","description":"Response DTO for listing stack profiles."},"ListStackTargetsResponse":{"properties":{"targets":{"items":{"$ref":"#/components/schemas/tools_api__src__application__responses__list_stack_targets_response__StackTargetItem"},"type":"array","title":"Targets"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["targets","total_count"],"title":"ListStackTargetsResponse","description":"Response DTO for listing stack targets."},"LiveAgentsResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/AgentRowResponse"},"type":"array","title":"Rows"},"totals":{"$ref":"#/components/schemas/AgentTotalsResponse"}},"type":"object","required":["rows","totals"],"title":"LiveAgentsResponse","description":"`GET /live/agents` — organisation totals; the self-only rule does not apply."},"LiveCardsResponse":{"properties":{"checks":{"type":"integer","title":"Checks","description":"`live_check` calls in the period"},"files_checked":{"type":"integer","title":"Files Checked","description":"Distinct (repository, path) pairs checked in the period; always <= checks"},"repositories":{"type":"integer","title":"Repositories","description":"Distinct repositories of the checks"},"per_week":{"type":"number","title":"Per Week","description":"Checks divided by the weeks of the period, rounded half-up to one decimal"},"pending":{"type":"integer","title":"Pending","description":"Files checked with no merged-file row of their path after the check"},"issues_found":{"type":"integer","title":"Issues Found","description":"Issues `live_check` returned in the period"},"issues_high":{"type":"integer","title":"Issues High","description":"Of those, issues from rules of severity HIGH"},"fixes_reported":{"type":"integer","title":"Fixes Reported","description":"Issues the agent later reported fixed or prevented through `register_applied_actions`, same repository, rule and path. Not verified."},"members":{"type":"integer","title":"Members","description":"Users with a role in the organisation"},"devs_active":{"type":"integer","title":"Devs Active","description":"Distinct connection owners with a check in the period"},"devs_not_connected":{"type":"integer","title":"Devs Not Connected","description":"Members with no MCP connection and no check ever"},"clients":{"type":"integer","title":"Clients","description":"Distinct clients of the checks"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name","description":"The client's label when `clients` is 1, otherwise null"}},"type":"object","required":["checks","files_checked","repositories","per_week","pending","issues_found","issues_high","fixes_reported","members","devs_active","devs_not_connected","clients"],"title":"LiveCardsResponse","description":"`GET /live/cards` — functional §7.1 and §7.2."},"LivePendingResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Files not merged the caller may see; equals card 2 for an admin"},"showing_all":{"type":"boolean","title":"Showing All","description":"False when the caller only sees their own rows"},"rows":{"items":{"$ref":"#/components/schemas/PendingRowResponse"},"type":"array","title":"Rows"}},"type":"object","required":["total","showing_all","rows"],"title":"LivePendingResponse","description":"`GET /live/pending` — self-only rule applied server-side."},"LiveTeamResponse":{"properties":{"connected":{"type":"integer","title":"Connected","description":"Members with an MCP connection or a check in 90 days"},"not_connected":{"type":"integer","title":"Not Connected","description":"Members with no MCP connection and no check ever"},"showing_all":{"type":"boolean","title":"Showing All","description":"False when the caller only sees their own rows (team view off, not admin)"},"rows":{"items":{"$ref":"#/components/schemas/TeamRowResponse"},"type":"array","title":"Rows"}},"type":"object","required":["connected","not_connected","showing_all","rows"],"title":"LiveTeamResponse","description":"`GET /live/team` — functional §7.3. Self-only rule applied server-side."},"LiveTrendsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TrendWeekResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"LiveTrendsResponse","description":"`GET /live/trends` — one item per ISO week of the period, empty weeks included."},"LlmEnrichedIssueResponse":{"properties":{"id":{"type":"string","title":"Id"},"line_number":{"type":"integer","title":"Line Number"},"detection_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detection Date"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"code_snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Snippet"},"rule":{"$ref":"#/components/schemas/RuleResponse"},"tool":{"anyOf":[{"$ref":"#/components/schemas/issues_api__src__infrastructure__controllers__issues_controller__ToolResponse"},{"type":"null"}]},"scanned_element":{"$ref":"#/components/schemas/ScannedElementResponse"},"scanned_code_units":{"items":{"$ref":"#/components/schemas/ScannedCodeUnitResponse"},"type":"array","title":"Scanned Code Units"},"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"score_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Reasoning"},"proposed_solution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Solution"}},"type":"object","required":["id","line_number","rule","scanned_element","scanned_code_units"],"title":"LlmEnrichedIssueResponse","description":"Respuesta de issue LLM: campos estándar + los cuatro campos LLM-específicos.\n\nEstos campos son exclusivos de los endpoints /llm/ (A11) y pueden ser null\ncuando el LLM no los produjo (E4)."},"LlmImpactAreaItem":{"properties":{"impact_area":{"type":"string","title":"Impact Area"},"num_issues":{"type":"integer","title":"Num Issues"}},"type":"object","required":["impact_area","num_issues"],"title":"LlmImpactAreaItem"},"LlmModuleItem":{"properties":{"module":{"type":"string","title":"Module"},"num_issues":{"type":"integer","title":"Num Issues"}},"type":"object","required":["module","num_issues"],"title":"LlmModuleItem"},"LlmProfilingReportResponse":{"properties":{"insights_severity":{"items":{"$ref":"#/components/schemas/LlmSeverityItem"},"type":"array","title":"Insights Severity"},"insights_impact_area":{"items":{"$ref":"#/components/schemas/LlmImpactAreaItem"},"type":"array","title":"Insights Impact Area"},"insights_rules":{"items":{"$ref":"#/components/schemas/LlmRuleItem"},"type":"array","title":"Insights Rules"},"insights_modules":{"items":{"$ref":"#/components/schemas/LlmModuleItem"},"type":"array","title":"Insights Modules"},"insights_tool_categories":{"items":{"$ref":"#/components/schemas/LlmToolCategoryItem"},"type":"array","title":"Insights Tool Categories"}},"type":"object","required":["insights_severity","insights_impact_area","insights_rules","insights_modules","insights_tool_categories"],"title":"LlmProfilingReportResponse","description":"KPIs descriptivos sobre los issues evaluados por LLM (solo llm_issues).\n\nDeliberadamente NO expone stack-profile score ni badge (§2.5, A13): un input\nno determinista no debe producir ningún número de calidad de cabecera."},"LlmRuleItem":{"properties":{"rule_name":{"type":"string","title":"Rule Name"},"num_issues":{"type":"integer","title":"Num Issues"},"sum_time_to_fix":{"type":"integer","title":"Sum Time To Fix"}},"type":"object","required":["rule_name","num_issues","sum_time_to_fix"],"title":"LlmRuleItem"},"LlmSeverityItem":{"properties":{"severity":{"type":"string","title":"Severity"},"num_issues":{"type":"integer","title":"Num Issues"}},"type":"object","required":["severity","num_issues"],"title":"LlmSeverityItem"},"LlmToolCategoryItem":{"properties":{"tool_category":{"type":"string","title":"Tool Category"},"num_issues":{"type":"integer","title":"Num Issues"}},"type":"object","required":["tool_category","num_issues"],"title":"LlmToolCategoryItem"},"McpAppliedActionItemResponse":{"properties":{"id":{"type":"integer","title":"Id"},"mcp_client_info_name":{"type":"string","title":"Mcp Client Info Name"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"llm_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Name"},"llm_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Version"},"report_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Report Date"},"report":{"additionalProperties":true,"type":"object","title":"Report"}},"type":"object","required":["id","mcp_client_info_name","report"],"title":"McpAppliedActionItemResponse"},"McpConnectionActions":{"properties":{"can_edit":{"type":"boolean","title":"Can Edit"},"can_delete":{"type":"boolean","title":"Can Delete"},"can_renew_key":{"type":"boolean","title":"Can Renew Key"},"can_revoke_key":{"type":"boolean","title":"Can Revoke Key"}},"type":"object","required":["can_edit","can_delete","can_renew_key","can_revoke_key"],"title":"McpConnectionActions","description":"Per-row capability flags for the MCP Connections screen."},"McpConnectionApiKeySnippet":{"properties":{"id":{"type":"string","title":"Id"},"last_four":{"type":"string","title":"Last Four"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"is_revoked":{"type":"boolean","title":"Is Revoked"}},"type":"object","required":["id","last_four","expires_at","is_revoked"],"title":"McpConnectionApiKeySnippet","description":"Active MCP key metadata (never plaintext)."},"McpConnectionItem":{"properties":{"client_info_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Info Name"},"client_info_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Info Version"},"last_connection":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Connection"}},"additionalProperties":false,"type":"object","title":"McpConnectionItem","description":"Item de conexión MCP asociada a una API key."},"McpConnectionStackProfileSnippet":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version","description":"Semantic version when present in catalogue; otherwise empty string.","default":""}},"type":"object","required":["id","name"],"title":"McpConnectionStackProfileSnippet","description":"Nested stack_profile { id, name, version }."},"McpConnectionView":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["repository","connection"],"title":"Type"},"name":{"type":"string","title":"Name"},"stack_profile":{"$ref":"#/components/schemas/McpConnectionStackProfileSnippet"},"api_key":{"anyOf":[{"$ref":"#/components/schemas/McpConnectionApiKeySnippet"},{"type":"null"}]},"last_connection_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Connection At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"actions":{"$ref":"#/components/schemas/McpConnectionActions"}},"type":"object","required":["id","type","name","stack_profile","created_at","actions"],"title":"McpConnectionView","description":"Unified shape for repository-backed and standalone connection rows."},"MemberCapacityCheckRequest":{"properties":{"pending_invitations":{"type":"integer","minimum":0.0,"title":"Pending Invitations","default":0},"slots":{"type":"integer","minimum":1.0,"title":"Slots","default":1}},"type":"object","title":"MemberCapacityCheckRequest"},"MemberCapacityCheckResponse":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"unlimited":{"type":"boolean","title":"Unlimited"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"current_members":{"type":"integer","title":"Current Members"},"pending_invitations":{"type":"integer","title":"Pending Invitations"},"slots":{"type":"integer","title":"Slots"}},"type":"object","required":["allowed","unlimited","max_users","current_members","pending_invitations","slots"],"title":"MemberCapacityCheckResponse"},"MergeAgentRowResponse":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Reported model; null is 'Model not reported'"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"client":{"type":"string","title":"Client"},"issues_found":{"type":"integer","title":"Issues Found","description":"Same fact as Issues found on the Live checks tab"},"not_merged":{"type":"integer","title":"Not Merged"},"verified_fixed":{"type":"integer","title":"Verified Fixed"},"reached_branch":{"type":"integer","title":"Reached Branch"},"fix_rate_verified_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fix Rate Verified Pct","description":"verified_fixed / (verified_fixed + reached_branch), %; null when that is 0"}},"type":"object","required":["model","version","client","issues_found","not_merged","verified_fixed","reached_branch","fix_rate_verified_pct"],"title":"MergeAgentRowResponse","description":"One row of Agent performance at merge (functional §8.5)."},"MergeAgentTotalsResponse":{"properties":{"issues_found":{"type":"integer","title":"Issues Found"},"not_merged":{"type":"integer","title":"Not Merged"},"verified_fixed":{"type":"integer","title":"Verified Fixed","description":"Equals card 4"},"reached_branch":{"type":"integer","title":"Reached Branch","description":"Equals 'found in the editor first' on card 3"}},"type":"object","required":["issues_found","not_merged","verified_fixed","reached_branch"],"title":"MergeAgentTotalsResponse"},"MergeAgentsResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/MergeAgentRowResponse"},"type":"array","title":"Rows"},"totals":{"$ref":"#/components/schemas/MergeAgentTotalsResponse"}},"type":"object","required":["rows","totals"],"title":"MergeAgentsResponse","description":"`GET /merge/agents` — Model not reported rows last."},"MergeCardsResponse":{"properties":{"files_merged":{"type":"integer","title":"Files Merged","description":"Merged-file rows of the period"},"unmatched_files":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unmatched Files","description":"Only with `user_id`: merged files of the period whose commit author matches no workspace account"},"repositories":{"type":"integer","title":"Repositories","description":"Distinct repositories of the merged files"},"pushes":{"type":"integer","title":"Pushes","description":"Distinct push-triggered merge scans of the merged files"},"checked":{"type":"integer","title":"Checked","description":"Merged files whose state is `checked`"},"checked_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Checked Pct","description":"checked / files_merged, %; null without files"},"previous_checked_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Checked Pct","description":"The same share over the previous period of the same length; null without files"},"reached":{"type":"integer","title":"Reached","description":"Findings the completed push scans of the period marked as introduced"},"reached_seen_first":{"type":"integer","title":"Reached Seen First","description":"Issues found in the editor that the covering merge scan found again"},"reached_not_seen":{"type":"integer","title":"Reached Not Seen","description":"reached - reached_seen_first, never below 0"},"issues_found":{"type":"integer","title":"Issues Found","description":"Issues found in the editor in the period = not_merged + verified_fixed + reached_seen_first"},"base":{"type":"integer","title":"Base","description":"verified_fixed + reached_seen_first"},"verified_fixed":{"type":"integer","title":"Verified Fixed","description":"Issues whose file reached the branch and the merge scan did not report the rule"},"fix_rate_verified_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fix Rate Verified Pct","description":"verified_fixed / base, %; null when base is 0"},"not_merged":{"type":"integer","title":"Not Merged","description":"Issues whose file no merge scan has covered since the check"},"repos_without_merge_scan":{"type":"integer","title":"Repos Without Merge Scan","description":"Repositories with merged files in the period and no completed push scan; left out of every issue figure"}},"type":"object","required":["files_merged","repositories","pushes","checked","checked_pct","previous_checked_pct","reached","reached_seen_first","reached_not_seen","issues_found","base","verified_fixed","fix_rate_verified_pct","not_merged","repos_without_merge_scan"],"title":"MergeCardsResponse","description":"`GET /merge/cards` — functional §8.1 and §8.2."},"MergeCheckTriggerBody":{"properties":{"repository_id":{"type":"string","title":"Repository Id"},"source_branch":{"type":"string","title":"Source Branch"},"target_branch":{"type":"string","title":"Target Branch"},"head_commit":{"type":"string","title":"Head Commit"},"base_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Commit"},"pr_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pr Reference"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},"type":"object","required":["repository_id","source_branch","target_branch","head_commit"],"title":"MergeCheckTriggerBody","description":"Internal trigger to run a merge-check (DIFF) scan end-to-end."},"MergeDeveloperRowResponse":{"properties":{"row_id":{"type":"string","title":"Row Id","description":"Opaque: user:<id>, or author-<n> for a git author"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"The workspace user; null for a git author"},"display_name":{"type":"string","title":"Display Name","description":"The user's login, or the git author name"},"matched":{"type":"boolean","title":"Matched","description":"The commit email belongs to a current workspace user"},"has_checks":{"type":"boolean","title":"Has Checks","description":"The user ran a live check in the period"},"files_merged":{"type":"integer","title":"Files Merged"},"checked_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Checked Pct"},"reached":{"type":"integer","title":"Reached","description":"Issues reached the branch in files of this author"},"verified_fixed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verified Fixed","description":"Verified fixes in files this author merged; null without checks"}},"type":"object","required":["row_id","user_id","display_name","matched","has_checks","files_merged","checked_pct","reached","verified_fixed"],"title":"MergeDeveloperRowResponse","description":"One row of Developer merge quality (functional §8.4)."},"MergeDevelopersResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/MergeDeveloperRowResponse"},"type":"array","title":"Rows"},"threshold":{"type":"integer","title":"Threshold","description":"Coverage warning threshold, %"},"showing_all":{"type":"boolean","title":"Showing All","description":"False when the caller only sees their own row (team view off, not admin)"}},"type":"object","required":["rows","threshold","showing_all"],"title":"MergeDevelopersResponse","description":"`GET /merge/developers` — rows by files merged, high to low."},"MergeRepositoriesResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/MergeRepositoryRowResponse"},"type":"array","title":"Rows"},"threshold":{"type":"integer","title":"Threshold","description":"Coverage warning threshold, %: rows below it are flagged"}},"type":"object","required":["rows","threshold"],"title":"MergeRepositoriesResponse","description":"`GET /merge/repositories` — rows ordered by checked before merge, low to high."},"MergeRepositoryRowResponse":{"properties":{"repository_id":{"type":"string","title":"Repository Id"},"name":{"type":"string","title":"Name"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch","description":"The imported branch"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"github | bitbucket"},"files_merged":{"type":"integer","title":"Files Merged"},"checked_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Checked Pct","description":"Checked before merge, %"},"reached":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reached","description":"Issues reached the branch; null when the repository has no merge scan"},"verified_fixed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verified Fixed","description":"Verified fixed; null when the repository has no merge scan"},"last_merge_scan_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Merge Scan At","description":"Latest completed push scan, unbounded by the period"},"has_merge_scan":{"type":"boolean","title":"Has Merge Scan","description":"At least one completed push scan, ever"}},"type":"object","required":["repository_id","name","branch","provider","files_merged","checked_pct","reached","verified_fixed","last_merge_scan_at","has_merge_scan"],"title":"MergeRepositoryRowResponse","description":"One row of Codebase risk & compliance (functional §8.3)."},"MergeWeekResponse":{"properties":{"week":{"type":"string","title":"Week","description":"ISO week label, e.g. 2026-W37"},"week_start":{"type":"string","title":"Week Start","description":"Monday 00:00 UTC, ISO-8601"},"partial":{"type":"boolean","title":"Partial","description":"The week in progress"},"merged":{"type":"integer","title":"Merged"},"checked":{"type":"integer","title":"Checked"},"not_checked":{"type":"integer","title":"Not Checked"}},"type":"object","required":["week","week_start","partial","merged","checked","not_checked"],"title":"MergeWeekResponse","description":"One ISO week of Pre-merge check adoption (functional §8.6)."},"MergeWeeklyResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MergeWeekResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MergeWeeklyResponse","description":"`GET /merge/weekly` — every week of the period, empty ones included."},"ModuleLanguageInsight":{"properties":{"language_name":{"type":"string","title":"Language Name"},"metrics":{"additionalProperties":{"type":"integer"},"type":"object","title":"Metrics"}},"type":"object","required":["language_name","metrics"],"title":"ModuleLanguageInsight","description":"Insight de un lenguaje dentro de un módulo."},"ModuleRankings":{"properties":{"rank_by_scanned_elements":{"type":"integer","title":"Rank By Scanned Elements"},"by_language_issues":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Language Issues"}},"type":"object","required":["rank_by_scanned_elements","by_language_issues"],"title":"ModuleRankings","description":"Rankings de un módulo."},"ModulesPaginationInfo":{"properties":{"total":{"type":"integer","title":"Total"},"strategy":{"type":"string","title":"Strategy"},"count":{"type":"integer","title":"Count"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","required":["total","strategy","count"],"title":"ModulesPaginationInfo","description":"Información de paginación para módulos (incluye count y strategy)."},"MyMcpConnectionItem":{"properties":{"id":{"type":"string","title":"Id"},"auth_method":{"type":"string","enum":["oauth","api_key"],"title":"Auth Method"},"client_info_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Info Name"},"client_info_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Info Version"},"linked_repository_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked Repository Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_connection":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Connection"},"is_revoked":{"type":"boolean","title":"Is Revoked","default":false}},"additionalProperties":false,"type":"object","required":["id","auth_method"],"title":"MyMcpConnectionItem","description":"One row of the unified OAuth + API-key connections view."},"OnboardingRequest":{"properties":{"first_touch":{"$ref":"#/components/schemas/UtmBundleRequest"},"last_touch":{"$ref":"#/components/schemas/UtmBundleRequest"}},"type":"object","title":"OnboardingRequest"},"OnboardingResponse":{"properties":{"persisted":{"type":"boolean","title":"Persisted"}},"type":"object","required":["persisted"],"title":"OnboardingResponse"},"OrgDeleteNowRequest":{"properties":{"org_id_confirmation":{"type":"string","title":"Org Id Confirmation","description":"Must match the org_id path parameter exactly (Keycloak org id)"},"acknowledged":{"type":"boolean","title":"Acknowledged","description":"Must be true to confirm irreversible deletion"}},"type":"object","required":["org_id_confirmation","acknowledged"],"title":"OrgDeleteNowRequest"},"OrgDeleteNowResponse":{"properties":{"audit_id":{"type":"string","format":"uuid","title":"Audit Id"},"notifications_sent":{"type":"boolean","title":"Notifications Sent"},"subscription_cancelled":{"type":"boolean","title":"Subscription Cancelled","default":false}},"type":"object","required":["audit_id","notifications_sent"],"title":"OrgDeleteNowResponse"},"OrgMcpConnectionItem":{"properties":{"id":{"type":"string","title":"Id"},"auth_method":{"type":"string","title":"Auth Method"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"client_info_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Info Name"},"client_info_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Info Version"},"client_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ip"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"},"linked_repository_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked Repository Name"},"linked_repositories":{"items":{"$ref":"#/components/schemas/LinkedRepositoryItem"},"type":"array","title":"Linked Repositories","default":[]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_connection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Connection"}},"type":"object","required":["id","auth_method"],"title":"OrgMcpConnectionItem","description":"One open MCP connection in the org roster (who / which client / from where)."},"OrgMcpConnectionsResponse":{"properties":{"organisation_id":{"type":"string","title":"Organisation Id"},"mcp_open_count":{"type":"integer","title":"Mcp Open Count"},"used":{"type":"integer","title":"Used"},"max_connections":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Connections"},"at_limit":{"type":"boolean","title":"At Limit","default":false},"connections":{"items":{"$ref":"#/components/schemas/OrgMcpConnectionItem"},"type":"array","title":"Connections"}},"type":"object","required":["organisation_id","mcp_open_count","used","connections"],"title":"OrgMcpConnectionsResponse","description":"The org's open MCP connections plus shared connection-quota usage."},"OrgMetricsInfo":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/RepositoryRefInfo"},"type":"array","title":"Repositories"},"targets":{"items":{"$ref":"#/components/schemas/ToolTargetRefInfo"},"type":"array","title":"Targets"},"rules_count":{"type":"integer","title":"Rules Count","default":0},"issues_count":{"type":"integer","title":"Issues Count","default":0},"last_scan_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scan At"}},"type":"object","title":"OrgMetricsInfo"},"OrgQuotaItemResponse":{"properties":{"quota_key":{"type":"string","title":"Quota Key"},"tier_default":{"anyOf":[{"$ref":"#/components/schemas/TierDefaultResponse"},{"type":"null"}]},"organisation_quota":{"anyOf":[{"$ref":"#/components/schemas/OrganisationQuotaResponse"},{"type":"null"}]},"used_vs_available":{"type":"string","title":"Used Vs Available"},"available":{"type":"boolean","title":"Available"},"reset_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reset At"},"scans_reward":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scans Reward"}},"type":"object","required":["quota_key","tier_default","organisation_quota","used_vs_available","available","reset_at"],"title":"OrgQuotaItemResponse"},"OrgQuotasResponse":{"properties":{"organisation_id":{"type":"string","title":"Organisation Id"},"tier":{"type":"string","title":"Tier"},"tier_defaults":{"items":{"$ref":"#/components/schemas/TierDefaultResponse"},"type":"array","title":"Tier Defaults"},"quotas":{"items":{"$ref":"#/components/schemas/OrgQuotaItemResponse"},"type":"array","title":"Quotas"},"billing_status":{"anyOf":[{"$ref":"#/components/schemas/BillingStatusResponse"},{"type":"null"}]},"price_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"billing_mode":{"type":"string","title":"Billing Mode","default":"default"}},"type":"object","required":["organisation_id","tier","tier_defaults","quotas"],"title":"OrgQuotasResponse"},"OrgToolItemResponse":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"tier_default_included":{"type":"boolean","title":"Tier Default Included"},"enabled":{"type":"boolean","title":"Enabled"},"state":{"type":"string","title":"State"},"unlock_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock Tier"}},"type":"object","required":["tool_id","tier_default_included","enabled","state"],"title":"OrgToolItemResponse"},"OrgToolsResponse":{"properties":{"organisation_id":{"type":"string","title":"Organisation Id"},"tier":{"type":"string","title":"Tier"},"tools":{"items":{"$ref":"#/components/schemas/OrgToolItemResponse"},"type":"array","title":"Tools"}},"type":"object","required":["organisation_id","tier","tools"],"title":"OrgToolsResponse"},"OrgUserListItemResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"role_names":{"items":{"type":"string"},"type":"array","title":"Role Names"},"first_assigned_at":{"type":"string","format":"date-time","title":"First Assigned At"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["user_id","role_names","first_assigned_at"],"title":"OrgUserListItemResponse","description":"One user with org-scoped role names (no resource identifiers)."},"OrgUserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/OrgUserListItemResponse"},"type":"array","title":"Users"}},"type":"object","required":["users"],"title":"OrgUserListResponse","description":"Response body for GET /orgs/{org_id}/users."},"OrganisationQuotaResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"quota_key":{"type":"string","title":"Quota Key"},"max_allowed":{"type":"integer","title":"Max Allowed"},"current_usage":{"type":"integer","title":"Current Usage"},"reset_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset Period"},"period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period Start"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organisation_id","quota_key","max_allowed","current_usage","reset_period","period_start","created_at","updated_at"],"title":"OrganisationQuotaResponse"},"PagedIssuesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EnrichedIssueResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"PagedIssuesResponse"},"PagedLlmIssuesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LlmEnrichedIssueResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"PagedLlmIssuesResponse"},"PagedRulesCommonDataResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RuleCommonDataItemResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"PagedRulesCommonDataResponse","description":"Respuesta paginada con cursor para rules common data."},"PagedTasksResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"prev_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prev Cursor"}},"type":"object","required":["items"],"title":"PagedTasksResponse"},"PaginationInfo":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","required":["total"],"title":"PaginationInfo","description":"Información de paginación básica (para ce_types, rules)."},"PatchScanScheduleRequest":{"properties":{"frequency_weeks":{"anyOf":[{"type":"integer","maximum":52.0,"minimum":1.0},{"type":"null"}],"title":"Frequency Weeks","description":"Recurrence interval in weeks (1–52)."},"day_of_week":{"anyOf":[{"type":"integer","maximum":6.0,"minimum":0.0},{"type":"null"}],"title":"Day Of Week","description":"Day of the week: 0 = Monday, 1 = Tuesday, …, 6 = Sunday."},"local_time":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}],"title":"Local Time","description":"Time of day in HH:MM format (24-hour clock, 00:00–23:59), e.g. '09:00', '14:30'."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA timezone identifier, e.g. 'Europe/Madrid', 'America/New_York', 'UTC'. Full list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"}},"type":"object","title":"PatchScanScheduleRequest"},"PendingRowResponse":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Owner of the latest pending check"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"client":{"type":"string","title":"Client"},"repository_id":{"type":"string","title":"Repository Id"},"repository_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Name"},"files":{"type":"integer","title":"Files","description":"Files whose latest pending check is this row's"},"oldest_check_at":{"type":"string","format":"date-time","title":"Oldest Check At","description":"First pending check of those files"}},"type":"object","required":["client","repository_id","files","oldest_check_at"],"title":"PendingRowResponse","description":"One row of Checked, not merged (functional §7.5). Never carries a path."},"PersonalOrgCleanupPreviewResponse":{"properties":{"deletable":{"type":"boolean","title":"Deletable"},"reason":{"type":"string","title":"Reason"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"member_count":{"type":"integer","title":"Member Count","default":0},"repository_count":{"type":"integer","title":"Repository Count","default":0}},"type":"object","required":["deletable","reason"],"title":"PersonalOrgCleanupPreviewResponse","description":"What the delete would do, for the confirmation prompt shown to the owner."},"PersonalOrgCleanupRequest":{"properties":{"owner_user_id":{"type":"string","title":"Owner User Id"}},"type":"object","required":["owner_user_id"],"title":"PersonalOrgCleanupRequest"},"PersonalOrgCleanupResponse":{"properties":{"deleted":{"type":"boolean","title":"Deleted"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["deleted","reason"],"title":"PersonalOrgCleanupResponse"},"ProductionReadyNode":{"properties":{"overall":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall"},"tier":{"type":"string","enum":["GOLD","CERTIFIED","CONDITIONAL","NOT_READY","UNSCORED"],"title":"Tier"},"hard_fail":{"$ref":"#/components/schemas/HardFailNode"},"formula_version":{"type":"string","title":"Formula Version","default":"v2"},"cap_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cap Reason"}},"type":"object","required":["tier","hard_fail"],"title":"ProductionReadyNode"},"ProfileAgentResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name"},"origin":{"type":"string","title":"Origin"},"inherited_from":{"anyOf":[{"$ref":"#/components/schemas/InheritedFromResponse"},{"type":"null"}]},"can_remove":{"type":"boolean","title":"Can Remove"},"ce_types":{"items":{"$ref":"#/components/schemas/CeTypeApiItem"},"type":"array","title":"Ce Types"},"agent_features":{"items":{"$ref":"#/components/schemas/AgentFeatureApiItem"},"type":"array","title":"Agent Features"}},"type":"object","required":["agent_id","name","origin","inherited_from","can_remove"],"title":"ProfileAgentResponse","description":"A single agent entry in the profile agents list."},"ProfileAgentsResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/ProfileAgentResponse"},"type":"array","title":"Agents"},"inheritance_chain":{"items":{"$ref":"#/components/schemas/InheritanceChainNode"},"type":"array","title":"Inheritance Chain"}},"type":"object","required":["agents","inheritance_chain"],"title":"ProfileAgentsResponse","description":"Full response for the list-agents endpoint."},"ProfilingReportResponse":{"properties":{"insights_general":{"anyOf":[{"$ref":"#/components/schemas/InsightsGeneral"},{"type":"null"}]},"insights_tools_categories":{"anyOf":[{"$ref":"#/components/schemas/InsightsToolsCategories"},{"type":"null"}]},"insights_modules":{"anyOf":[{"$ref":"#/components/schemas/InsightsModules"},{"type":"null"}]},"insights_ce_type":{"anyOf":[{"$ref":"#/components/schemas/InsightsCeTypes"},{"type":"null"}]},"insights_severity":{"anyOf":[{"$ref":"#/components/schemas/InsightsSeverity"},{"type":"null"}]},"insights_impact_area":{"anyOf":[{"$ref":"#/components/schemas/InsightsImpactArea"},{"type":"null"}]},"insights_rules":{"anyOf":[{"$ref":"#/components/schemas/InsightsRules"},{"type":"null"}]},"technical_summary":{"anyOf":[{"items":{"$ref":"#/components/schemas/TechnicalSummaryItem"},"type":"array"},{"type":"null"}],"title":"Technical Summary"},"functional_summary":{"anyOf":[{"items":{"$ref":"#/components/schemas/FunctionalSummaryItem"},"type":"array"},{"type":"null"}],"title":"Functional Summary"}},"type":"object","title":"ProfilingReportResponse","description":"Respuesta completa del profiling report.\n\nEsta clase es opcional ya que el response se construye dinámicamente\npor los builders. Se usa principalmente para documentación OpenAPI."},"PromoteStackProfileBody":{"properties":{"target_scope":{"type":"string","enum":["org","workspace"],"title":"Target Scope"},"target_org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Org Id"},"target_workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Workspace Id"}},"additionalProperties":false,"type":"object","required":["target_scope"],"title":"PromoteStackProfileBody","description":"Body: target_scope plus exactly one of target_org_id / target_workspace_id."},"PromptPayload":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"Rule prompt in markdown, injected as an agent skill"}},"type":"object","required":["prompt"],"title":"PromptPayload","description":"Payload of a judgement-based rule: the rule prompt in markdown (QSA-1566)."},"PromptRuleInput":{"properties":{"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"file_extensions":{"items":{"type":"string"},"type":"array","title":"File Extensions"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"is_common":{"type":"boolean","title":"Is Common","default":false},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"file_extensions_ids":{"items":{"type":"string"},"type":"array","title":"File Extensions Ids","default":[]},"path_patterns":{"items":{"type":"string"},"type":"array","title":"Path Patterns","default":[]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"ruleset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ruleset Id"}},"type":"object","required":["rule_slug","version","name","description","severity","impact_area","estimated_time_to_fix","platforms","ce_types","file_extensions","repository_ids","org_uuids","payload"],"title":"PromptRuleInput","description":"Input model del endpoint de reglas prompt (QSA-1566)."},"PromptRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"payload":{"$ref":"#/components/schemas/PromptPayload"},"is_common":{"type":"boolean","title":"Is Common"}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area","ce_types","platforms","repository_ids","org_uuids","payload","is_common"],"title":"PromptRuleResponse","description":"Respuesta para reglas de tipo prompt."},"PublicDemoCoverageResponse":{"properties":{"stack_profile":{"anyOf":[{"$ref":"#/components/schemas/PublicDemoCoverageStackProfileResponse"},{"type":"null"}]},"targets":{"items":{"$ref":"#/components/schemas/PublicDemoCoverageTargetResponse"},"type":"array","title":"Targets"}},"type":"object","required":["targets"],"title":"PublicDemoCoverageResponse","description":"Consolidated coverage payload for the anonymous demo Coverage tab."},"PublicDemoCoverageStackProfileResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id"],"title":"PublicDemoCoverageStackProfileResponse","description":"The demo's curated stack profile identity (no curation internals)."},"PublicDemoCoverageTargetResponse":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Layer"},"target_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Key"},"target_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"tools":{"items":{"$ref":"#/components/schemas/PublicDemoCoverageToolResponse"},"type":"array","title":"Tools"}},"type":"object","required":["id","tools"],"title":"PublicDemoCoverageTargetResponse","description":"A detected stack target (language/framework/platform) and its tools."},"PublicDemoCoverageToolResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"rules_in_catalog":{"type":"integer","title":"Rules In Catalog"},"rules_with_findings":{"type":"integer","title":"Rules With Findings"}},"type":"object","required":["id","name","rules_in_catalog","rules_with_findings"],"title":"PublicDemoCoverageToolResponse","description":"A consolidated tool on a target, with its rule-coverage counts."},"RebuildRuleBody":{"properties":{"rule_id":{"type":"string","minLength":1,"title":"Rule Id"},"repository_id":{"type":"string","minLength":1,"title":"Repository Id"},"instructions":{"type":"string","minLength":1,"title":"Instructions"}},"type":"object","required":["rule_id","repository_id","instructions"],"title":"RebuildRuleBody","description":"HTTP body: replace a rule using new LLM instructions."},"ReferralListItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"invitee_email":{"type":"string","title":"Invitee Email"},"status":{"type":"string","enum":["pending","accepted","expired","invalidated"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"}},"type":"object","required":["id","invitee_email","status","created_at"],"title":"ReferralListItemResponse"},"RegexPayload":{"properties":{"regex":{"type":"string","title":"Regex","description":"Regular expression pattern for the rule"}},"type":"object","required":["regex"],"title":"RegexPayload","description":"Payload interno que contiene el regex de la regla."},"RegexRuleInput":{"properties":{"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"file_extensions":{"items":{"type":"string"},"type":"array","title":"File Extensions"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"is_common":{"type":"boolean","title":"Is Common","default":false},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"file_extensions_ids":{"items":{"type":"string"},"type":"array","title":"File Extensions Ids","default":[]},"path_patterns":{"items":{"type":"string"},"type":"array","title":"Path Patterns","default":[]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"ruleset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ruleset Id"}},"type":"object","required":["rule_slug","version","name","description","severity","impact_area","estimated_time_to_fix","platforms","ce_types","file_extensions","repository_ids","org_uuids","payload"],"title":"RegexRuleInput"},"RegexRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"payload":{"$ref":"#/components/schemas/RegexPayload"},"is_common":{"type":"boolean","title":"Is Common"}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area","ce_types","platforms","repository_ids","org_uuids","payload","is_common"],"title":"RegexRuleResponse","description":"Respuesta para reglas de tipo regex."},"RemoveStackProfileAgentResponse":{"properties":{"propagated_to":{"type":"integer","title":"Propagated To","description":"Number of descendant profiles where an inherited link was removed."}},"type":"object","required":["propagated_to"],"title":"RemoveStackProfileAgentResponse","description":"Body returned after removing a locally attached agent."},"RepositoryBadgeSummaryResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"repository":{"$ref":"#/components/schemas/RepositorySummaryNode"},"stack_profile":{"$ref":"#/components/schemas/StackProfileSummaryNode"},"scan":{"anyOf":[{"$ref":"#/components/schemas/ScanSummaryNode"},{"type":"null"}]},"badge":{"$ref":"#/components/schemas/BadgeNode"},"rules":{"$ref":"#/components/schemas/RulesTotalsNode"},"stack_tags":{"items":{"type":"string"},"type":"array","title":"Stack Tags"},"targets":{"items":{"$ref":"#/components/schemas/TargetSummaryNode"},"type":"array","title":"Targets"}},"type":"object","required":["generated_at","repository","stack_profile","rules"],"title":"RepositoryBadgeSummaryResponse"},"RepositoryItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"},"is_stack_profile_selectable":{"type":"boolean","title":"Is Stack Profile Selectable","description":"True while stack_profile_locked_at is NULL (ADR-010 FE signal)."},"is_demo":{"type":"boolean","title":"Is Demo","description":"True for the shared, read-only demo repository (QSA-1244).","default":false},"user_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Uuid"},"platform_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Code"},"org_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Uuid"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"git_flavor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Flavor"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"scan":{"anyOf":[{"$ref":"#/components/schemas/LatestScanNode"},{"type":"null"}],"description":"Presente solo si `include` contiene `scan` (último scan, cualquier status)."},"last_success_scan":{"anyOf":[{"$ref":"#/components/schemas/LatestScanNode"},{"type":"null"}],"description":"Presente solo si `include` contiene `last_success_scan` (último scan SUCCESS o PARTIAL)."},"inventory":{"anyOf":[{"$ref":"#/components/schemas/InventoryNode"},{"type":"null"}],"description":"Presente solo si `include` contiene `inventory` (snapshot legacy)."},"stack_profile":{"anyOf":[{"$ref":"#/components/schemas/CuratedStackProfileNode"},{"type":"null"}],"description":"Presente solo si `include` contiene `stack_profile` (perfil curado)."},"api_keys":{"anyOf":[{"items":{"$ref":"#/components/schemas/ApiKeyListItem"},"type":"array"},{"type":"null"}],"title":"Api Keys","description":"Presente solo si `include` contiene `active_api_keys`. API keys del repositorio no revocadas y no expiradas; mismo modelo que GET /api-keys."},"active_schedule":{"anyOf":[{"$ref":"#/components/schemas/ActiveScheduleNode"},{"type":"null"}],"description":"Presente solo si `include` contiene `active_schedule`."},"agent_metrics":{"anyOf":[{"$ref":"#/components/schemas/tools_api__src__application__responses__repository_response__AgentMetricsNode"},{"type":"null"}],"description":"Presente solo si `include` contiene `agent_metrics` (QSA-927)."}},"type":"object","required":["id","name","url","is_stack_profile_selectable"],"title":"RepositoryItem"},"RepositoryRefInfo":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"}},"type":"object","required":["name","url"],"title":"RepositoryRefInfo"},"RepositoryStackProfileScoreResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"repository":{"$ref":"#/components/schemas/RepositorySummaryNode"},"stack_profile":{"$ref":"#/components/schemas/StackProfileSummaryNode"},"scan":{"anyOf":[{"$ref":"#/components/schemas/ScanSummaryNode"},{"type":"null"}]},"production_ready":{"$ref":"#/components/schemas/ProductionReadyNode"},"impact_areas":{"items":{"$ref":"#/components/schemas/ImpactAreaScoreNode"},"type":"array","title":"Impact Areas"}},"type":"object","required":["generated_at","repository","stack_profile","production_ready"],"title":"RepositoryStackProfileScoreResponse"},"RepositorySummaryNode":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"total_scanned_elements":{"type":"integer","title":"Total Scanned Elements"},"is_stack_profile_selectable":{"type":"boolean","title":"Is Stack Profile Selectable"}},"type":"object","required":["id","name","total_scanned_elements","is_stack_profile_selectable"],"title":"RepositorySummaryNode"},"RevokeApiKeyMcpBody":{"properties":{"api_key_id":{"type":"string","title":"Api Key Id"}},"type":"object","required":["api_key_id"],"title":"RevokeApiKeyMcpBody"},"RolePermissionAdminResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role_name":{"type":"string","title":"Role Name"},"action":{"type":"string","title":"Action"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role_name","action","description","is_active","created_at"],"title":"RolePermissionAdminResponse","description":"Response schema for a single role_permissions row (req 3, 4, 5)."},"RolePermissionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RolePermissionAdminResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"RolePermissionListResponse","description":"Paginated response schema for GET /admin/role-permissions (req 3)."},"RuleCommonDataItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"bad_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bad Code"},"good_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Good Code"},"compliance":{"items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"type":"array","title":"Compliance"},"tool":{"anyOf":[{"$ref":"#/components/schemas/rules_api__src__application__responses__rule_common_data_response__ToolResponse"},{"type":"null"}]},"issues_metadata":{"anyOf":[{"$ref":"#/components/schemas/IssuesMetadataResponse"},{"type":"null"}]},"rule_details":{"anyOf":[{"$ref":"#/components/schemas/RuleDetailsResponse"},{"type":"null"}]}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area"],"title":"RuleCommonDataItemResponse","description":"Item de rule en la respuesta paginada de common-data/by-repository."},"RuleCoreResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"bad_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bad Code"},"good_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Good Code"},"compliance":{"items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"type":"array","title":"Compliance"}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area"],"title":"RuleCoreResponse","description":"Campos canónicos compartidos entre RuleItemResponse y RuleCommonDataItemResponse."},"RuleCreationResult":{"properties":{"rule_slug":{"type":"string","title":"Rule Slug","description":"Rule slug identificador"},"status":{"type":"string","enum":["created","already_exists","failed"],"title":"Status","description":"Estado de la operación"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"ID de la regla si fue creada o existe"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Mensaje de error si falló"}},"type":"object","required":["rule_slug","status"],"title":"RuleCreationResult","description":"Resultado de la creación de una regla individual dentro del batch.\n\nPrincipio SOLID: ISP - Interface Segregation Principle.\nCada resultado es independiente y contiene solo la información necesaria."},"RuleDetailsResponse":{"properties":{"ce_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ce Types"},"platforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Platforms"},"repository_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repository Ids"},"org_uuids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Org Uuids"},"file_extensions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"File Extensions"},"files_whitelist_path_patterns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Files Whitelist Path Patterns"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","title":"RuleDetailsResponse","description":"Detalles adicionales de una rule (m2m + payload).\n\nSolo se incluye si include=rule_details o include=rule_payload en el request.\nCampos opcionales sin valor se omiten en JSON (response_model_exclude_none)."},"RuleItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"bad_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bad Code"},"good_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Good Code"},"compliance":{"items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"type":"array","title":"Compliance"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"repository_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Repository Ids"},"org_uuids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Org Uuids"},"file_extensions":{"items":{"type":"string"},"type":"array","title":"File Extensions"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"files_whitelist_path_patterns":{"items":{"type":"string"},"type":"array","title":"Files Whitelist Path Patterns","default":[]},"rule_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Type"}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area","ce_types","platforms","file_extensions","payload"],"title":"RuleItemResponse"},"RuleMetricNode":{"properties":{"rule_id":{"type":"string","title":"Rule Id"},"rule_name":{"type":"string","title":"Rule Name"},"rule_description":{"type":"string","title":"Rule Description"},"severity_id":{"type":"string","title":"Severity Id"},"num_issues":{"type":"integer","title":"Num Issues"},"tech_debt":{"type":"integer","title":"Tech Debt"}},"type":"object","required":["rule_id","rule_name","rule_description","severity_id","num_issues","tech_debt"],"title":"RuleMetricNode"},"RuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"bad_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bad Code"},"good_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Good Code"},"compliance":{"items":{"$ref":"#/components/schemas/ComplianceControlResponse"},"type":"array","title":"Compliance"}},"type":"object","required":["id","name","description","severity","impact_area","estimated_time_to_fix"],"title":"RuleResponse"},"RulesGroupResponse":{"properties":{"type":{"type":"string","enum":["regex","xpath","external_tool","semgrep","prompt"],"title":"Type"},"rules":{"items":{"$ref":"#/components/schemas/RuleItemResponse"},"type":"array","title":"Rules"}},"type":"object","required":["type","rules"],"title":"RulesGroupResponse"},"RulesTotalsNode":{"properties":{"repo_total_with_findings":{"type":"integer","title":"Repo Total With Findings"},"repo_total_in_catalog":{"type":"integer","title":"Repo Total In Catalog"}},"type":"object","required":["repo_total_with_findings","repo_total_in_catalog"],"title":"RulesTotalsNode"},"RulesetVersionResponse":{"properties":{"ruleset_version_id":{"type":"string","title":"Ruleset Version Id"},"name":{"type":"string","title":"Name"},"launch_date":{"type":"string","format":"date","title":"Launch Date"}},"type":"object","required":["ruleset_version_id","name","launch_date"],"title":"RulesetVersionResponse","description":"Response para versiones de ruleset.","example":{"launch_date":"2025-10-20","name":"Norma FastAPI Agent 1.0","ruleset_version_id":"qc_fastapi_1.0"}},"ScanRequest":{"properties":{"repository_id":{"type":"integer","title":"Repository Id"}},"type":"object","required":["repository_id"],"title":"ScanRequest","description":"Modelo para la petición de escaneo de repositorio\n\nAttributes:\n    repository_id (int): ID del repositorio a escanear"},"ScanResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"repository_id":{"type":"integer","title":"Repository Id"},"scan_id":{"type":"string","title":"Scan Id"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["status","message","repository_id","scan_id","timestamp"],"title":"ScanResponse","description":"Modelo para la respuesta del escaneo de repositorio\n\nAttributes:\n    status (str): Estado del escaneo (success/error)\n    message (str): Mensaje descriptivo del resultado\n    repository_id (int): ID del repositorio escaneado\n    scan_id (str): ID único del escaneo\n    timestamp (str): Timestamp del escaneo"},"ScanScheduleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organisation_id":{"type":"string","format":"uuid","title":"Organisation Id"},"repository_id":{"type":"string","title":"Repository Id"},"timing":{"$ref":"#/components/schemas/ScanScheduleTimingResponse"},"active":{"type":"boolean","title":"Active"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"open_failure_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Open Failure Task Id"},"next_run_at":{"type":"string","format":"date-time","title":"Next Run At"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organisation_id","repository_id","timing","active","consecutive_failures","open_failure_task_id","next_run_at","created_by_user_id","created_at","updated_at"],"title":"ScanScheduleResponse"},"ScanScheduleTimingResponse":{"properties":{"frequency_weeks":{"type":"integer","title":"Frequency Weeks"},"day_of_week":{"type":"integer","title":"Day Of Week"},"local_time":{"type":"string","title":"Local Time"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["frequency_weeks","day_of_week","local_time","timezone"],"title":"ScanScheduleTimingResponse"},"ScanStatusNode":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"status":{"type":"string","title":"Status"},"scan_id":{"type":"string","title":"Scan Id"}},"type":"object","required":["tool_id","status","scan_id"],"title":"ScanStatusNode","description":"Modelo para representar el estado de un tool en un scan."},"ScanSummaryNode":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"status":{"type":"string","title":"Status"},"start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End"}},"type":"object","required":["scan_id","status"],"title":"ScanSummaryNode"},"ScanV2Body":{"properties":{"repository_id":{"type":"integer","title":"Repository Id"},"tool_ids":{"items":{"type":"string"},"type":"array","title":"Tool Ids"},"scan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scan Id","description":"Parámetro opcional para debugging"}},"additionalProperties":true,"type":"object","required":["repository_id","tool_ids"],"title":"ScanV2Body"},"ScanV3Body":{"properties":{"repository_id":{"type":"integer","title":"Repository Id"},"tool_ids":{"items":{"type":"string"},"type":"array","title":"Tool Ids"},"scan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scan Id","description":"Parámetro opcional para debugging"}},"additionalProperties":true,"type":"object","required":["repository_id","tool_ids"],"title":"ScanV3Body"},"ScanV3Response":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"repository_id":{"type":"integer","title":"Repository Id"},"tool_ids":{"items":{"type":"string"},"type":"array","title":"Tool Ids"},"scan_id":{"type":"string","title":"Scan Id"},"scan_status":{"type":"string","enum":["RUNNING","QUEUED"],"title":"Scan Status","default":"RUNNING"}},"type":"object","required":["status","message","repository_id","tool_ids","scan_id"],"title":"ScanV3Response","description":"The body ``POST /api/v3/scan`` answers with when the scan starts.\n\nNot a variant of ``ScanResponse`` above: v3 reports the tools the scan was\nstarted for and carries no timestamp. Declared so the shape the endpoint has\nalways returned appears in the OpenAPI document -- the Hub generates its\nclient from it -- instead of living only inside the controller function.\n\nAttributes:\n    status (str): \"success\" when the scan was created\n    message (str): Human-readable result\n    repository_id (int): Repository the scan was started for\n    tool_ids (list[str]): Tools the scan will run\n    scan_id (str): Identifier to poll the scan with\n    scan_status (str): RUNNING when the scan started, QUEUED when it waits\n        for a free scan slot and starts on its own later (QSA-1829)"},"ScannedCodeUnitResponse":{"properties":{"id":{"type":"string","title":"Id"},"scanned_element":{"type":"string","title":"Scanned Element"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"value":{"type":"string","title":"Value"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details"}},"type":"object","required":["id","scanned_element","name","type","value"],"title":"ScannedCodeUnitResponse"},"ScannedElementResponse":{"properties":{"id":{"type":"string","title":"Id"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"file_path":{"type":"string","title":"File Path"},"ce_type_id":{"type":"string","title":"Ce Type Id"},"link_to_element":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link To Element"}},"type":"object","required":["id","file_path","ce_type_id"],"title":"ScannedElementResponse"},"ScopeType":{"type":"string","enum":["global","org","workspace","project"],"title":"ScopeType","description":"Four-level scope hierarchy for curated stack profiles."},"SendReferralRequest":{"properties":{"invitee_email":{"type":"string","title":"Invitee Email","description":"Email address of the person to invite"}},"type":"object","required":["invitee_email"],"title":"SendReferralRequest"},"SendReferralResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"SendReferralResponse"},"SendToFixResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"status":{"type":"string","title":"Status","default":"QUEUED"},"kubernetes_job_name":{"type":"string","title":"Kubernetes Job Name"}},"type":"object","required":["task_id","kubernetes_job_name"],"title":"SendToFixResponse"},"SeverityBreakdownNode":{"properties":{"high":{"type":"integer","title":"High","default":0},"medium":{"type":"integer","title":"Medium","default":0},"low":{"type":"integer","title":"Low","default":0}},"type":"object","title":"SeverityBreakdownNode","description":"Individual finding counts per severity (one entry per issue, not per rule).\n\nThese are the counts shown on the card. Under v3 they also feed the score: the\ntotal drives the density penalty and ``high`` additionally pays the criticality\ncost, so the number and the chips beside it always tell the same story."},"SeverityImpactAreaCount":{"properties":{"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"count":{"type":"integer","minimum":0.0,"title":"Count"}},"type":"object","required":["severity","impact_area","count"],"title":"SeverityImpactAreaCount","description":"Conteo de issues para una combinación (severity, impact_area)."},"StackProfileAgentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StackProfileAgentResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"StackProfileAgentListResponse","description":"Response body for listing agent links of a stack profile."},"StackProfileAgentResponse":{"properties":{"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id"},"tool_id":{"type":"string","title":"Tool Id"},"origin":{"$ref":"#/components/schemas/AgentLinkOrigin"},"added_at":{"type":"string","format":"date-time","title":"Added At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"base_tool_scope":{"anyOf":[{"$ref":"#/components/schemas/BaseToolScopeResponse"},{"type":"null"}]},"targets":{"anyOf":[{"items":{"$ref":"#/components/schemas/StackTargetSummaryResponse"},"type":"array"},{"type":"null"}],"title":"Targets"},"agent_features":{"anyOf":[{"items":{"$ref":"#/components/schemas/AgentFeatureSummaryResponse"},"type":"array"},{"type":"null"}],"title":"Agent Features"}},"type":"object","required":["stack_profile_id","tool_id","origin","added_at"],"title":"StackProfileAgentResponse","description":"Response body for a single tool link (agent) on a stack profile."},"StackProfileListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StackProfileResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"StackProfileListResponse","description":"Response body for listing curated stack profiles."},"StackProfileMatchResponse":{"properties":{"stack_profile_id":{"type":"string","format":"uuid","title":"Stack Profile Id"},"name":{"type":"string","title":"Name"},"score":{"type":"number","title":"Score"},"matched_targets":{"items":{"type":"string"},"type":"array","title":"Matched Targets"},"total_profile_targets":{"type":"integer","title":"Total Profile Targets"}},"type":"object","required":["stack_profile_id","name","score","matched_targets","total_profile_targets"],"title":"StackProfileMatchResponse"},"StackProfileMatchesResponse":{"properties":{"repository_id":{"type":"string","title":"Repository Id"},"matches":{"items":{"$ref":"#/components/schemas/StackProfileMatchResponse"},"type":"array","title":"Matches"}},"type":"object","required":["repository_id","matches"],"title":"StackProfileMatchesResponse"},"StackProfileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"scope_type":{"$ref":"#/components/schemas/ScopeType"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"repository_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repository Id"}},"type":"object","required":["id","name","scope_type","is_default","created_at","updated_at"],"title":"StackProfileResponse","description":"Response body for a single curated stack profile."},"StackProfileSummaryNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"version":{"type":"string","title":"Version","default":"1.0"}},"type":"object","required":["id","name"],"title":"StackProfileSummaryNode"},"StackTargetSummaryResponse":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"StackTargetSummaryResponse","description":"Minimal stack_target shape for nested lists."},"SubmitFeedbackRequest":{"properties":{"feedback_type":{"type":"string","enum":["bug","feature_request","general"],"title":"Feedback Type"},"description":{"type":"string","title":"Description"},"page_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Page Url"}},"type":"object","required":["feedback_type","description"],"title":"SubmitFeedbackRequest"},"SubmitFeedbackResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"SubmitFeedbackResponse"},"TargetMetricNode":{"properties":{"target_name":{"type":"string","title":"Target Name"},"num_scanned_elements":{"type":"integer","title":"Num Scanned Elements"}},"type":"object","required":["target_name","num_scanned_elements"],"title":"TargetMetricNode"},"TargetSummaryNode":{"properties":{"target_id":{"type":"string","format":"uuid","title":"Target Id"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"layer":{"type":"string","title":"Layer"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"agents":{"items":{"$ref":"#/components/schemas/AgentBadgeNode"},"type":"array","title":"Agents"}},"type":"object","required":["target_id","target_key","target_name","layer"],"title":"TargetSummaryNode"},"TaskResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"task_type":{"type":"string","title":"Task Type"},"status":{"type":"string","title":"Status"},"target_id":{"type":"string","title":"Target Id"},"repo_id":{"type":"string","title":"Repo Id"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"input_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Payload"},"result_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result Payload"},"execution_log":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Log"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["id","name","task_type","status","target_id","repo_id","created_at"],"title":"TaskResponse"},"TeamRowResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username","description":"Display login; null when not cached"},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client","description":"Client label; null on idle and not-connected rows"},"agents":{"items":{"type":"string"},"type":"array","title":"Agents","description":"Distinct models the client reported on this row's calls in the period"},"checks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Checks","description":"Null on a not-connected row"},"files_checked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Files Checked"},"issues_found":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Issues Found"},"fixes_reported":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fixes Reported"},"last_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Check At","description":"Latest check of this row, unbounded by the period"},"status":{"type":"string","enum":["active","idle","not_connected"],"title":"Status"}},"type":"object","required":["user_id","status"],"title":"TeamRowResponse","description":"One row of Team adoption & tool usage (functional §7.3)."},"TeamUpgradeEnquiryRequest":{"properties":{"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"message":{"type":"string","maxLength":2000,"title":"Message"}},"type":"object","required":["first_name","last_name","email","message"],"title":"TeamUpgradeEnquiryRequest"},"TeamUpgradeEnquiryResponse":{"properties":{"enquiry_id":{"type":"string","format":"uuid","title":"Enquiry Id"}},"type":"object","required":["enquiry_id"],"title":"TeamUpgradeEnquiryResponse"},"TechnicalSummaryItem":{"properties":{"section":{"type":"string","title":"Section"},"summary":{"type":"string","title":"Summary"},"rating":{"type":"string","title":"Rating"},"remediations":{"items":{"type":"string"},"type":"array","title":"Remediations","default":[]}},"type":"object","required":["section","summary","rating"],"title":"TechnicalSummaryItem","description":"Item de resumen técnico."},"TestAutoDiscoveryRequest":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"tool_id":{"type":"string","title":"Tool Id"},"git_url":{"type":"string","title":"Git Url"},"api_key":{"type":"string","title":"Api Key"},"branch":{"type":"string","title":"Branch"},"repository_id":{"type":"string","title":"Repository Id"},"repository_name":{"type":"string","title":"Repository Name"},"platform_code":{"type":"string","title":"Platform Code"},"org_uuid":{"type":"string","title":"Org Uuid"},"scan_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scan Path"}},"additionalProperties":true,"type":"object","required":["scan_id","tool_id","git_url","api_key","branch","repository_id","repository_name","platform_code","org_uuid"],"title":"TestAutoDiscoveryRequest"},"TierDefaultResponse":{"properties":{"quota_key":{"type":"string","title":"Quota Key"},"max_allowed":{"type":"integer","title":"Max Allowed"},"reset_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset Period"}},"type":"object","required":["quota_key","max_allowed","reset_period"],"title":"TierDefaultResponse"},"TierQuotaResponse":{"properties":{"quota_key":{"type":"string","title":"Quota Key"},"max_allowed":{"type":"integer","title":"Max Allowed"},"reset_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reset Period"}},"type":"object","required":["quota_key","max_allowed","reset_period"],"title":"TierQuotaResponse"},"TierResponse":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"quotas":{"items":{"$ref":"#/components/schemas/TierQuotaResponse"},"type":"array","title":"Quotas"},"rank":{"type":"integer","title":"Rank"},"is_billable":{"type":"boolean","title":"Is Billable"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["code","name","description","price_amount","currency","quotas","rank","is_billable","is_active"],"title":"TierResponse"},"TierToolItem":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"included":{"type":"boolean","title":"Included"}},"type":"object","required":["tool_id","included"],"title":"TierToolItem"},"TierToolsResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"tools":{"items":{"$ref":"#/components/schemas/TierToolItem"},"type":"array","title":"Tools"}},"type":"object","required":["tier","tools"],"title":"TierToolsResponse"},"ToolByTargetResponse":{"additionalProperties":true,"type":"object"},"ToolMetricNode":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"target_name":{"type":"string","title":"Target Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"output_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"num_issues":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Issues"},"total_tech_debt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Tech Debt"},"issues_by_severity":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Issues By Severity"},"tech_debt_by_severity":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tech Debt By Severity"},"num_scanned_elements":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Scanned Elements"}},"type":"object","required":["tool_name","target_name"],"title":"ToolMetricNode"},"ToolTargetRefInfo":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"ToolTargetRefInfo","description":"Stack target linked via tool_target (subset of StackTargetItem)."},"ToolsMetadataNode":{"properties":{"count_tools":{"type":"integer","minimum":0.0,"title":"Count Tools","description":"Número de herramientas asociadas al target"}},"type":"object","required":["count_tools"],"title":"ToolsMetadataNode","description":"Metadata de herramientas asociadas a un target."},"TrendWeekResponse":{"properties":{"week":{"type":"string","title":"Week","description":"ISO week label, e.g. '2026-W37'"},"week_start":{"type":"string","title":"Week Start","description":"Monday 00:00 UTC of that week, ISO-8601"},"partial":{"type":"boolean","title":"Partial","description":"True for the week in progress"},"total":{"type":"integer","title":"Total","description":"Live checks of the week; the bars sum to card 1"},"by_client":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Client","description":"Checks per client label, every client, most first"}},"type":"object","required":["week","week_start","partial","total"],"title":"TrendWeekResponse","description":"One bar of Check volume trends (functional §7.6)."},"UpdateAnalyticsSettingsRequest":{"properties":{"analytics_team_view":{"type":"boolean","title":"Analytics Team View"}},"additionalProperties":false,"type":"object","required":["analytics_team_view"],"title":"UpdateAnalyticsSettingsRequest","description":"Body of PUT /analytics/v1/settings. Admins only; the catalogue enforces it.\n\nUnknown fields are refused, not ignored (QSA-1842): the coverage warning\nthreshold is deployment configuration, and a body that tries to set it must\nget a 422 rather than a 200 that changed nothing."},"UpdateConnectionRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stack_profile_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stack Profile Id"}},"type":"object","title":"UpdateConnectionRequest"},"UpdateCuratedStackProfileBody":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateCuratedStackProfileBody","description":"Request body for PUT /tools/v1/curated-stack-profiles/{profile_id}.\n\nAt least one of name or description must be provided.\nis_default is intentionally excluded — this endpoint only edits metadata."},"UpdateEndpointPermissionRequest":{"properties":{"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action","description":"Action required to call this endpoint (e.g. 'repo:view'). Set to null to make the endpoint public."},"resource_extractor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Extractor","description":"Strategy for extracting resource_id from the request (e.g. 'path:repository_id', 'jwt_org', 'none')."},"is_active":{"type":"boolean","title":"Is Active","description":"Whether this endpoint is actively enforced by the authorization middleware."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description of the endpoint."},"expected_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expected Updated At","description":"Optimistic concurrency token. Supply the updated_at value received from the last GET. Omit to skip the concurrency check."}},"type":"object","required":["is_active"],"title":"UpdateEndpointPermissionRequest","description":"Request body for PUT /admin/endpoint-permissions/{id} (req 3).\n\nOnly the fields the admin UI is allowed to modify are exposed.\nexpected_updated_at enables optimistic concurrency: when provided, the\nbackend rejects the update with 409 if the row has changed since the\nUI last fetched it (req 5)."},"UpdateRolePermissionRequest":{"properties":{"is_active":{"type":"boolean","title":"Is Active","description":"Whether this role-action grant is actively enforced."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Human-readable description of the grant."}},"type":"object","required":["is_active"],"title":"UpdateRolePermissionRequest","description":"Request body for PUT /admin/role-permissions/{id} (req 4)."},"UpdateStackProfileBody":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","version"],"title":"UpdateStackProfileBody"},"UpdateStackProfileRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"type":"object","title":"UpdateStackProfileRequest","description":"Request body for PATCH /api/v1/stack-profiles/{profile_id}."},"UpdateStackProfileResponse":{"properties":{"stack_profile":{"anyOf":[{"$ref":"#/components/schemas/tools_api__src__application__responses__update_stack_profile_response__StackProfileItem"},{"type":"null"}]}},"type":"object","title":"UpdateStackProfileResponse"},"UpdateStackTargetBody":{"properties":{"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["layer","target_key","target_name"],"title":"UpdateStackTargetBody"},"UpdateStackTargetResponse":{"properties":{"stack_target":{"anyOf":[{"$ref":"#/components/schemas/tools_api__src__application__responses__update_stack_target_response__StackTargetItem"},{"type":"null"}]}},"type":"object","title":"UpdateStackTargetResponse","description":"Response DTO for updating a stack target."},"UpdateToolStatusBody":{"properties":{"status":{"type":"string","enum":["ON","OFF"],"title":"Status"}},"type":"object","required":["status"],"title":"UpdateToolStatusBody","description":"Body del request HTTP para actualizar el status de una tool."},"UpdateToolStatusResponse":{"properties":{"tool_id":{"type":"string","title":"Tool Id"},"status":{"type":"string","enum":["ON","OFF"],"title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["tool_id","status","message"],"title":"UpdateToolStatusResponse","description":"Response DTO para la actualización del status de una tool."},"UpdateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"New name for the workspace. Must be unique within the organisation."}},"type":"object","required":["name"],"title":"UpdateWorkspaceRequest","description":"Request body for PUT /orgs/{org_id}/workspaces/{workspace_id}."},"UserResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"username":{"type":"string","title":"Username"},"onboarding_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Completed At"}},"type":"object","required":["user_id","username","onboarding_completed_at"],"title":"UserResponse"},"UserRoleAssignmentItemResponse":{"properties":{"role_name":{"type":"string","title":"Role Name"},"scope":{"type":"string","title":"Scope"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"assigned_at":{"type":"string","format":"date-time","title":"Assigned At"}},"type":"object","required":["role_name","scope","resource_id","assigned_at"],"title":"UserRoleAssignmentItemResponse","description":"Single item in the GET list of role assignments (200 OK)."},"UserRoleAssignmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserRoleAssignmentItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"UserRoleAssignmentListResponse","description":"Response body for the GET list of role assignments (200 OK)."},"UserWorkspaceListItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"member_count":{"type":"integer","title":"Member Count"},"repo_count":{"type":"integer","title":"Repo Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"keycloak_org_id":{"type":"string","title":"Keycloak Org Id"}},"type":"object","required":["id","name","member_count","repo_count","created_at","keycloak_org_id"],"title":"UserWorkspaceListItemResponse","description":"Single workspace for GET /orgs/workspaces-by-user (cross-org)."},"UserWorkspacesByUserResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserWorkspaceListItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"UserWorkspacesByUserResponse","description":"Response for GET /api/v1/orgs/workspaces-by-user."},"UtmBundleRequest":{"properties":{"source":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Source"},"medium":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Medium"},"campaign":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Campaign"},"content":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Content"},"term":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Term"}},"type":"object","title":"UtmBundleRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkspaceListItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"member_count":{"type":"integer","title":"Member Count"},"repo_count":{"type":"integer","title":"Repo Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","member_count","repo_count","created_at"],"title":"WorkspaceListItemResponse","description":"Single workspace item for GET /orgs/{org_id}/workspaces."},"WorkspaceMemberListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"WorkspaceMemberListResponse","description":"Response envelope for the members list endpoint."},"WorkspaceMemberResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"role_name":{"type":"string","title":"Role Name"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["user_id","role_name","joined_at"],"title":"WorkspaceMemberResponse","description":"Single member item for GET /workspaces/{workspace_id}/members."},"WorkspacePageResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkspaceListItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"WorkspacePageResponse","description":"Paginated response for GET /orgs/{org_id}/workspaces."},"WorkspaceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","org_id","created_at","updated_at"],"title":"WorkspaceResponse","description":"Response body for workspace CRUD endpoints."},"XpathPayload":{"properties":{"xpath_expression":{"type":"string","title":"Xpath Expression","description":"XPath expression pattern for the rule"}},"type":"object","required":["xpath_expression"],"title":"XpathPayload","description":"Payload interno que contiene la expresión XPath de la regla."},"XpathRuleInput":{"properties":{"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"file_extensions":{"items":{"type":"string"},"type":"array","title":"File Extensions"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"is_common":{"type":"boolean","title":"Is Common","default":false},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"file_extensions_ids":{"items":{"type":"string"},"type":"array","title":"File Extensions Ids","default":[]},"path_patterns":{"items":{"type":"string"},"type":"array","title":"Path Patterns","default":[]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"ruleset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ruleset Id"}},"type":"object","required":["rule_slug","version","name","description","severity","impact_area","estimated_time_to_fix","platforms","ce_types","file_extensions","repository_ids","org_uuids","payload"],"title":"XpathRuleInput"},"XpathRuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"rule_slug":{"type":"string","title":"Rule Slug"},"version":{"type":"string","title":"Version"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"estimated_time_to_fix":{"type":"integer","title":"Estimated Time To Fix"},"severity":{"type":"string","title":"Severity"},"impact_area":{"type":"string","title":"Impact Area"},"ce_types":{"items":{"type":"string"},"type":"array","title":"Ce Types"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms"},"repository_ids":{"items":{"type":"integer"},"type":"array","title":"Repository Ids"},"org_uuids":{"items":{"type":"string"},"type":"array","title":"Org Uuids"},"payload":{"$ref":"#/components/schemas/XpathPayload"},"is_common":{"type":"boolean","title":"Is Common"}},"type":"object","required":["id","rule_slug","version","name","description","estimated_time_to_fix","severity","impact_area","ce_types","platforms","repository_ids","org_uuids","payload","is_common"],"title":"XpathRuleResponse","description":"Respuesta para reglas de tipo xpath."},"issues_api__src__infrastructure__controllers__issues_controller__ToolResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"}},"type":"object","required":["id","name","version"],"title":"ToolResponse"},"rules_api__src__application__responses__rule_common_data_response__ToolResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"}},"type":"object","required":["id","name","version"],"title":"ToolResponse","description":"Respuesta con información de la tool asociada a una rule."},"tools_api__src__application__responses__get_repository_by_id_response__AgentMetricsNode":{"properties":{"num_inactive_agents":{"type":"integer","title":"Num Inactive Agents"},"sum_rules_inactive_agents":{"type":"integer","title":"Sum Rules Inactive Agents"}},"type":"object","required":["num_inactive_agents","sum_rules_inactive_agents"],"title":"AgentMetricsNode","description":"KPIs about inactive agents for the repository (QSA-927, ADR-017)."},"tools_api__src__application__responses__get_stack_profile_by_id_response__StackProfileItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","version"],"title":"StackProfileItem"},"tools_api__src__application__responses__get_targets_by_stack_profile_response__StackTargetItem":{"properties":{"id":{"type":"string","title":"Id","description":"ID del stack target"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer","description":"Capa del stack target"},"target_key":{"type":"string","title":"Target Key","description":"Clave del target"},"target_name":{"type":"string","title":"Target Name","description":"Nombre del target"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Descripción del target"},"tools_metadata":{"anyOf":[{"$ref":"#/components/schemas/ToolsMetadataNode"},{"type":"null"}],"description":"Metadata de herramientas (solo con include=tools_metadata)"},"autodiscovery_evidences":{"anyOf":[{"$ref":"#/components/schemas/AutodiscoveryEvidencesNode"},{"type":"null"}],"description":"Evidencias de autodiscovery (solo con include=autodiscovery_evidences)"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"StackTargetItem","description":"Pydantic model for Stack Target in API responses."},"tools_api__src__application__responses__list_stack_profiles_response__StackProfileItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","version"],"title":"StackProfileItem","description":"Individual stack profile item in the list response."},"tools_api__src__application__responses__list_stack_targets_response__StackTargetItem":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"StackTargetItem","description":"Individual stack target item in the list response."},"tools_api__src__application__responses__repository_response__AgentMetricsNode":{"properties":{"num_inactive_agents":{"type":"integer","minimum":0.0,"title":"Num Inactive Agents","description":"Count of agents available to the user for this repository that are not active in the repository's stack profile."},"sum_rules_inactive_agents":{"type":"integer","minimum":0.0,"title":"Sum Rules Inactive Agents","description":"Sum of `agent_built_tool.num_rules` across the inactive agents. 0 when the set is empty."}},"type":"object","required":["num_inactive_agents","sum_rules_inactive_agents"],"title":"AgentMetricsNode","description":"KPIs about inactive agents for the repository (QSA-927, ADR-017).\n\nPresent only when `include` contains `agent_metrics`. See the technical\ndesign \"Inactive-Agent KPIs per Repository\" for the operational definition."},"tools_api__src__application__responses__tool_response__ToolResponse":{"additionalProperties":true,"type":"object"},"tools_api__src__application__responses__update_stack_profile_response__StackProfileItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","name","version"],"title":"StackProfileItem"},"tools_api__src__application__responses__update_stack_target_response__StackTargetItem":{"properties":{"id":{"type":"string","title":"Id"},"layer":{"type":"string","enum":["Language","Framework","Platform"],"title":"Layer"},"target_key":{"type":"string","title":"Target Key"},"target_name":{"type":"string","title":"Target Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","layer","target_key","target_name"],"title":"StackTargetItem","description":"Individual stack target item in the update response."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"keycloak-openid":{"type":"openIdConnect","openIdConnectUrl":"https://account.qualityclouds.com//realms/ai-production/.well-known/openid-configuration"}}},"tags":[{"name":"scan"},{"name":"scan-status"},{"name":"api-key"},{"name":"org-user-roles"},{"name":"org-users"},{"name":"workspace-user-roles"},{"name":"workspaces"},{"name":"workspace-members"},{"name":"repository-workspace"},{"name":"stack-profiles-curated"},{"name":"tasks-dashboard"},{"name":"connections"},{"name":"mcp-connections"},{"name":"my-mcp-connections"},{"name":"org-quotas"},{"name":"org-tools"},{"name":"org-mcp-connections"},{"name":"tasks"},{"name":"billing"},{"name":"tiers"},{"name":"scan-schedules"},{"name":"organisations"},{"name":"users"},{"name":"service-invitations"},{"name":"service-organisations"},{"name":"merge-checks"},{"name":"scan-v2"},{"name":"scan-status-v2"},{"name":"test-auto-discovery"},{"name":"tool-builder-status"},{"name":"autodiscovery-status"},{"name":"scan-v3"},{"name":"admin"},{"name":"insights"},{"name":"analytics"},{"name":"tools"},{"name":"stack-profiles-picker"},{"name":"repositories"},{"name":"rules-metrics"},{"name":"curated-stack-profiles"},{"name":"referrals"},{"name":"referrals-webhooks"},{"name":"feedback"}]}