flip_api.model_services.get_all_models
Attributes
Functions
|
Validate the optional |
|
Estate-wide model list, scoped to the projects the caller can access (issue #726). |
Module Contents
- flip_api.model_services.get_all_models.router
- flip_api.model_services.get_all_models._parse_statuses(raw_status: str | None) list[flip_api.domain.schemas.status.ModelStatus] | None
Validate the optional
statusquery param (comma-separated) againstModelStatus.A comma-separated list lets the group filter tiles narrow to several statuses at once (e.g.
INITIATED,PENDINGfor “Queued”).- Parameters:
raw_status (str | None) – The raw
statusquery param, if supplied.- Returns:
The parsed statuses, or None when no filter was requested.
- Return type:
list[ModelStatus] | None
- Raises:
HTTPException – 400 if any value does not match a known status.
- flip_api.model_services.get_all_models.get_all_models_endpoint(request: fastapi.Request, session: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) flip_api.domain.interfaces.model.IModelsListResponse
Estate-wide model list, scoped to the projects the caller can access (issue #726).
A caller sees models for projects they own or have been granted access to; a user with
CAN_MANAGE_PROJECTSsees every model. Supports search (model or project name), a comma-separatedstatusfilter and pagination, and returns per-status tile counts.- Parameters:
request (Request) – The HTTP request, used to read query params.
session (Session) – The database session.
user_id (UUID) – The authenticated caller’s id.
- Returns:
A page of models (project, owner, trusts) plus per-status counts.
- Return type: