Attributes
add_attribute
async
add_attribute(auth: Annotated[Auth, Depends(authorize(HYBRID, [ADD]))], db: Annotated[Session, Depends(get_db)], event_id: Annotated[UUID | int, Path(alias=eventId)], body: AddAttributeBody) -> AddAttributeResponse
Add a new attribute with the given details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, [ADD]))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
event_id
|
Annotated[UUID | int, Path(alias=eventId)]
|
the ID or UUID of the event |
required |
body
|
AddAttributeBody
|
the body for adding an attribute |
required |
Returns:
Type | Description |
---|---|
AddAttributeResponse
|
the response of the added attribute from the api |
add_attribute_depr
async
add_attribute_depr(auth: Annotated[Auth, Depends(authorize(HYBRID, []))], db: Annotated[Session, Depends(get_db)], event_id: Annotated[int, Path(alias=eventId)], body: AddAttributeBody) -> AddAttributeResponse
Deprecated. Add a new attribute with the given details using the old route.
args:
the user’s authentification status
the current database
the id of the event
the body
returns:
the attribute
add_tag_to_attribute
async
add_tag_to_attribute(auth: Annotated[Auth, Depends(authorize(HYBRID, [TAGGER]))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int | UUID, Path(alias=attributeId)], tag_id: Annotated[str, Path(alias=tagId)], local: str) -> AddRemoveTagAttributeResponse
Add a tag to an attribute by there IDs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, [TAGGER]))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
the ID or UUID of the attribute |
required |
tag_id
|
Annotated[str, Path(alias=tagId)]
|
the ID of the tag |
required |
local
|
str
|
“1” for local |
required |
Returns:
Type | Description |
---|---|
AddRemoveTagAttributeResponse
|
the response from the api for adding a tag to an attribute |
delete_attribute
async
delete_attribute(auth: Annotated[Auth, Depends(authorize(HYBRID, []))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int | UUID, Path(alias=attributeId)], hard: bool = False) -> DeleteAttributeResponse
Delete an attribute by either by its ID or UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, []))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
the ID or UUID of the attribute |
required |
Returns:
Type | Description |
---|---|
DeleteAttributeResponse
|
the response from the api for the delete request |
delete_attribute_depr
async
delete_attribute_depr(auth: Annotated[Auth, Depends(authorize(HYBRID, []))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int, Path(alias=attributeId)], hard: bool = False) -> DeleteAttributeResponse
Deprecated. Delete an attribute by its ID using the old route.
args:
the user’s authentification status
the current database
the id of the attribute
returns:
the response from the api for the deleting request
get_attribute_details
async
get_attribute_details(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int | UUID, Path(alias=attributeId)]) -> GetAttributeResponse
Retrieve details of a specific attribute by either by its ID or UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
the ID or UUID of the attribute |
required |
Returns:
Type | Description |
---|---|
GetAttributeResponse
|
the attribute details |
get_attribute_details_depr
async
get_attribute_details_depr(auth: Annotated[Auth, Depends(authorize(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.
args:
the user’s authentification status
the current database
the id of the attribute
returns:
the details of an attribute
get_attributes
async
get_attributes(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)]) -> list[GetAllAttributesResponse]
get_attributes_category_statistics
async
get_attributes_category_statistics(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], percentage: bool) -> GetAttributeStatisticsCategoriesResponse
Get the count/percentage of attributes per category/type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
percentage
|
bool
|
percentage request or not |
required |
Returns:
Type | Description |
---|---|
GetAttributeStatisticsCategoriesResponse
|
the attributes statistics for one category/type |
get_attributes_describe_types
async
get_attributes_describe_types(auth: Annotated[Auth, Depends(authorize(HYBRID))]) -> GetDescribeTypesResponse
get_attributes_type_statistics
async
get_attributes_type_statistics(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], percentage: bool) -> GetAttributeStatisticsTypesResponse
Get the count/percentage of attributes per category/type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
percentage
|
bool
|
percentage request or not |
required |
Returns:
Type | Description |
---|---|
GetAttributeStatisticsTypesResponse
|
the attributes statistics for one category/type |
remove_tag_from_attribute
async
remove_tag_from_attribute(auth: Annotated[Auth, Depends(authorize(HYBRID, [TAGGER]))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int | UUID, Path(alias=attributeId)], tag_id: Annotated[str, Path(alias=tagId)]) -> AddRemoveTagAttributeResponse
Remove a tag from an attribute by there IDs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, [TAGGER]))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
the ID or UUID of the attribute |
required |
tag_id
|
Annotated[str, Path(alias=tagId)]
|
the ID of the tag |
required |
Returns:
Type | Description |
---|---|
AddRemoveTagAttributeResponse
|
the response from the api for removing a tag to an attribute |
rest_search_attributes
async
rest_search_attributes(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], body: SearchAttributesBody) -> SearchAttributesResponse
Search for attributes based on various filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
body
|
SearchAttributesBody
|
the search body |
required |
Returns:
Type | Description |
---|---|
SearchAttributesResponse
|
the attributes the search finds |
restore_attribute
async
restore_attribute(auth: Annotated[Auth, Depends(authorize(HYBRID, []))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int | UUID, Path(alias=attributeId)]) -> GetAttributeResponse
Restore an attribute either by its ID or UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, []))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
the ID or UUID of the attribute |
required |
Returns:
Type | Description |
---|---|
GetAttributeResponse
|
the restored attribute |
update_attribute
async
update_attribute(auth: Annotated[Auth, Depends(authorize(HYBRID, []))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int | UUID, Path(alias=attributeId)], body: EditAttributeBody) -> EditAttributeResponse
Update an existing attribute by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, []))]
|
the user’s authentification status |
required |
db
|
Annotated[Session, Depends(get_db)]
|
the current database |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
the ID or UUID of the attribute |
required |
body
|
EditAttributeBody
|
the body for editing the attribute |
required |
Returns:
Type | Description |
---|---|
EditAttributeResponse
|
the response from the api for the edit/update request |
update_attribute_depr
async
update_attribute_depr(auth: Annotated[Auth, Depends(authorize(HYBRID, []))], db: Annotated[Session, Depends(get_db)], attribute_id: Annotated[int, Path(alias=attributeId)], body: EditAttributeBody) -> EditAttributeResponse
Deprecated. Update an existing attribute by its ID using the old route.
args:
the user’s authentification status
the current database
the id of the attribute
the body
returns:
the updated version af an attribute