VOCs#
- async backend.app.api.vocs.create_voc(voc: Voc, db: Annotated[Session, Depends(get_db)])[source]#
Create a new VOC.
This endpoint allows the creation of a new VOC in the database.
- async backend.app.api.vocs.get_vocs(db: Annotated[Session, Depends(get_db)])[source]#
Retrieve all VOCs.
This endpoint retrieves all VOCs stored in the database.
- Parameters:
db (Session) – The database session.
- Returns:
A list of all VOCs.
- Return type:
list[Voc]
- async backend.app.api.vocs.get_vocs_by_subclass_name(subclass_name: str, db: Annotated[Session, Depends(get_db)])[source]#
Retrieve VOCs by subclass name.
This endpoint retrieves VOCs associated with a specific subclass.
- Parameters:
subclass_name (str) – The name of the VOC subclass.
db (Session) – The database session.
- Returns:
A list of VOCs associated with the specified subclass.
- Return type:
list[Voc]
- Raises:
HTTPException – no VOCs found