Attributes
add_attribute
async
add_attribute(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
body: AddAttributeBody,
) -> AddAttributeResponse
Add a new attribute with the given details.
Input:
-
the user's authentification status
-
the current database
-
the id of the event
-
the body for adding an attribute
Output:
- the response of the added attribute from the api
add_attribute_depr
async
add_attribute_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
body: AddAttributeBody,
) -> AddAttributeResponse
Deprecated. Add a new attribute with the given details using the old route.
Input:
-
the user's authentification status
-
the current database
-
the id of the event
-
the body
Output:
- the attribute
add_tag_to_attribute
async
add_tag_to_attribute(
auth: Annotated[
Auth,
Depends(
authorize(
AuthStrategy.HYBRID, [Permission.TAGGER]
)
),
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
tag_id: Annotated[str, Path(alias=tagId)],
local: str,
) -> AddRemoveTagAttributeResponse
Add a tag to an attribute by there ids.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
-
the id of the tag
-
local
Output:
- the response from the api for adding a tag to an attribute
delete_attribute
async
delete_attribute(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
) -> DeleteAttributeResponse
Delete an attribute by its ID.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
Output:
- the response from the api for the delete request
delete_attribute_depr
async
delete_attribute_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
) -> DeleteAttributeResponse
Deprecated. Delete an attribute by its ID using the old route.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
Output:
- the response from the api for the deleting request
delete_selected_attributes
async
delete_selected_attributes(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
body: DeleteSelectedAttributeBody,
request: Request,
) -> DeleteSelectedAttributeResponse
Deletes the attributes associated with the event from the list in the body.
Input:
-
the user's authentification status
-
the current database
-
the id of the event
-
the body for deleting the selected attributes
-
the request
Output:
- the response from the api for the deleting of the selection
get_attribute_details
async
get_attribute_details(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[int, Path(alias=attributeId)],
) -> GetAttributeResponse
Retrieve details of a specific attribute by its ID.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
Output:
- the attribute details
get_attribute_details_depr
async
get_attribute_details_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[int, Path(alias=attributeId)],
) -> GetAttributeResponse
Deprecated. Retrieve details of a specific attribute by its ID using the old route.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
Output:
- the details of an attribute
get_attributes
async
get_attributes(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> list[GetAllAttributesResponse]
Retrieve a list of all attributes.
Input:
- the user's authentification status
Output:
- the list of all attributes
get_attributes_category_statistics
async
get_attributes_category_statistics(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
percentage: bool,
) -> GetAttributeStatisticsCategoriesResponse
Get the count/percentage of attributes per category/type.
Input:
- the user's authentification status
- the current database
- percentage
Output:
- the attributes statistics for one category/type
get_attributes_describe_types
async
get_attributes_describe_types(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
]
) -> GetDescribeTypesResponse
Retrieve a list of all available attribute types and categories.
Input:
- the user's authentification status
Output:
- the attributes describe types
get_attributes_type_statistics
async
get_attributes_type_statistics(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
percentage: bool,
) -> GetAttributeStatisticsTypesResponse
Get the count/percentage of attributes per category/type.
Input:
- the user's authentification status
- the current database
- percentage
Output:
- the attributes statistics for one category/type
remove_tag_from_attribute
async
remove_tag_from_attribute(
auth: Annotated[
Auth,
Depends(
authorize(
AuthStrategy.HYBRID, [Permission.TAGGER]
)
),
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
tag_id: Annotated[str, Path(alias=tagId)],
) -> AddRemoveTagAttributeResponse
Remove a tag from an attribute by there ids.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
-
the id of the tag
Output:
- the response from the api for removing a tag to an attribute
rest_search_attributes
async
rest_search_attributes(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
body: SearchAttributesBody,
) -> SearchAttributesResponse
Search for attributes based on various filters.
Input:
-
the user's authentification status
-
the current database
-
the search body
Output:
- the attributes the search finds
restore_attribute
async
restore_attribute(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
) -> GetAttributeResponse
Restore an attribute by its ID.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
Output:
- the restored attribute
update_attribute
async
update_attribute(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
body: EditAttributeBody,
) -> EditAttributeResponse
Update an existing attribute by its ID.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
-
the body for editing the attribute
Output:
- the response from the api for the edit request
update_attribute_depr
async
update_attribute_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[str, Path(alias=attributeId)],
body: EditAttributeBody,
) -> EditAttributeResponse
Deprecated. Update an existing attribute by its ID using the old route.
Input:
-
the user's authentification status
-
the current database
-
the id of the attribute
-
the body
Output:
- the updated version af an attribute