flip_api.cohort_services.save_cohort_query
Attributes
Functions
|
Save a new cohort query to the database. |
Module Contents
- flip_api.cohort_services.save_cohort_query.router
- flip_api.cohort_services.save_cohort_query.save_cohort_query(request: fastapi.Request, cohort_query: flip_api.domain.schemas.cohort.CohortQueryInput, db: sqlmodel.Session = Depends(get_session), user_id: uuid.UUID = Depends(verify_token)) flip_api.domain.schemas.cohort.SubmitCohortQueryInput
Save a new cohort query to the database.
- Parameters:
request (Request) – HTTP request object
cohort_query (flip_api.domain.schemas.cohort.CohortQueryInput) – CohortQueryInput object containing the query details
db (Session) – Database session
user_id (UUID) – ID of the user making the request, obtained from authentication
- Returns:
The saved cohort query details including the query ID
- Return type:
- Raises:
HTTPException – If the user is not allowed, if the project is not in UNSTAGED status, if the query could not be
created, or if there is an internal server error –