Contacts#

async backend.app.api.contacts.create_contact(contact: Contact, db: Annotated[Session, Depends(get_db)])[source]#

Create a new contact.

This endpoint allows the creation of a new contact in the database.

Parameters:
  • contact (Contact) – The contact information to be added.

  • db (Session) – The database session.

Returns:

The created contact.

Return type:

Contact

async backend.app.api.contacts.get_all_contacts(db: Session = Depends(get_db))[source]#

Retrieve all contacts.

This endpoint retrieves all contacts stored in the database.

Parameters:

db (Session) – The database session.

Returns:

A list of all contacts.

Return type:

list[Contact]

async backend.app.api.contacts.get_contacts_by_dataset_id(dataset_id: int, db: Session = Depends(get_db))[source]#

Retrieve contacts by dataset ID.

This endpoint retrieves contacts associated with a specific dataset.

Parameters:
  • dataset_id (int) – The ID of the dataset.

  • db (Session) – The database session.

Returns:

A list of contacts associated with the specified dataset.

Return type:

list[Contact]