Organisations
add_organisation
async
add_organisation(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], body: AddOrganisation) -> GetOrganisationElement
Adds a new organisation.
args:
-
Data representing the organisation to be added
-
The current database
returns:
- The added organisation data
delete_organisation
async
delete_organisation(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], organisation_id: Annotated[str, Path(alias=orgId)]) -> DeleteForceUpdateOrganisationResponse
Deletes an organisation by its ID.
args:
-
ID of the organisation to delete
-
The current database
returns:
- Response indicating success or failure
get_organisation
async
get_organisation(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], organisation_id: Annotated[int | UUID, Path(alias=orgId)]) -> GetOrganisationElement
Gets an organisation by its ID.
args:
-
ID of the organisation to get
-
The current database
-
new: The Users authentification status
returns:
- Data of the searched organisation
get_organisation_depr
async
get_organisation_depr(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], organisation_id: Annotated[int | UUID, Path(alias=orgId)]) -> GetOrganisationResponse
Gets an organisation by its ID or UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
organisation_id
|
Annotated[int | UUID, Path(alias=orgId)]
|
ID or UUID of the organisation to get |
required |
db
|
Annotated[Session, Depends(get_db)]
|
The current database |
required |
Returns:
Type | Description |
---|---|
GetOrganisationResponse
|
Data of the searched organisation |
get_organisations
async
get_organisations(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)]) -> list[GetAllOrganisationResponse]
Gets all organisations as a list.
args:
- The current database
returns:
- List of all organisations
get_organisations_deprecated
async
get_organisations_deprecated(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)]) -> list[GetAllOrganisationResponse]
Gets all organisations as a list.
args:
- The current database
returns:
- List of all organisations
update_organisation
async
update_organisation(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], organisation_id: Annotated[str, Path(alias=orgId)], body: EditOrganisation) -> GetOrganisationElement
Updates an organisation by its ID.
args:
-
ID of the organisation to update
-
Updated data for the organisation
-
The current database
returns:
- Updated organisation data