Events
add_event
async
add_event(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
body: AddEventBody,
) -> AddEditGetEventResponse
Add a new event with the gi ven details.
Input:
-
the user's authentification status
-
the current database
-
the request body
Output:
- the new event
add_event_depr
async
add_event_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
body: AddEventBody,
) -> AddEditGetEventResponse
Deprecated. Add a new event with the given details.
Input:
-
the user's authentification status
-
the current database
-
the request body
Output:
- the new event
add_tag_to_event
async
add_tag_to_event(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
tag_id: Annotated[str, Path(alias=tagId)],
local: str,
) -> AddRemoveTagEventsResponse
Add a tag to an attribute by their ids.
Input:
-
the user's authentification status
-
the current database
-
the event id
-
the tag id
-
local
Output:
- the result of adding the tag to the event given by the api
delete_event
async
delete_event(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[int, Path(alias=eventId)],
) -> DeleteEventResponse
Delete an attribute by its ID.
Input:
-
the user's authentification status
-
the current database
-
the event id
Output:
- the deleted event
delete_event_depr
async
delete_event_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[int, Path(..., alias=eventId)],
) -> DeleteEventResponse
Deprecated. Delete an existing event by its ID.
Input:
-
the user's authentification status
-
the current database
-
the event id
Output:
- the deleted event
get_all_events
async
get_all_events(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
) -> list[GetAllEventsResponse]
Retrieve a list of all events.
Input:
-
the user's authentification status
-
the current database
Output:
- all events as a list
get_event_details
async
get_event_details(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[int, Path(alias=eventId)],
) -> AddEditGetEventResponse
Retrieve details of a specific event by ist ID.
Input:
-
the user's authentification status
-
the current database
-
the id of the event
Output:
- the event details
get_event_details_depr
async
get_event_details_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[int, Path(alias=eventId)],
) -> AddEditGetEventResponse
Deprecated. Retrieve details of a specific attribute by its ID.
Input:
-
the user's authentification status
-
the current database
-
the event id
Output:
- the event details
index_events
async
index_events(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
body: IndexEventsBody,
) -> list[GetAllEventsResponse]
Search for events based on various filters, which are more general than the ones in 'rest search'.
Input:
-
the user's authentification status
-
the current database
-
the request body
Output:
- the searched events
publish_event
async
publish_event(
auth: Annotated[
Auth,
Depends(
authorize(
AuthStrategy.HYBRID, [Permission.PUBLISH]
)
),
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
request: Request,
) -> PublishEventResponse
Publish an event by ist ID.
Input:
-
the user's authentification status
-
the current database
-
the event id
-
the request
Output:
- the published event
remove_tag_from_event
async
remove_tag_from_event(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
tag_id: Annotated[str, Path(alias=tagId)],
) -> AddRemoveTagEventsResponse
Remove a tag to from an event by their id.
Input:
-
the user's authentification status
-
the current database
-
the event id
-
the tag id
Output:
- the result of removing the tag from the event given by the api
rest_search_events
async
rest_search_events(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID))
],
db: Annotated[Session, Depends(get_db)],
body: SearchEventsBody,
) -> SearchEventsResponse
Search for events based on various filters.
Input:
-
the user's authentification status
-
the current database
-
the request body
Output:
- the searched events
start_freeTextImport
async
start_freeTextImport(
auth: Annotated[
Auth,
Depends(
authorize(
AuthStrategy.HYBRID, [Permission.SITE_ADMIN]
)
),
],
event_id: Annotated[str, Path(alias=eventID)],
body: AddAttributeViaFreeTextImportEventBody,
) -> FreeTextProcessID
Starts the freetext import process by submitting the freetext to the worker.
Input:
-
the user's authentification status
-
the body of the freetext
Output:
- dict
unpublish_event
async
unpublish_event(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
request: Request,
) -> UnpublishEventResponse
Unpublish an event by its ID.
Input:
-
the user's authentification status
-
the current database
-
the event id
-
the request
Output:
- the unpublished event
update_event
async
update_event(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
body: EditEventBody,
) -> AddEditGetEventResponse
Update an existing event by its ID.
Input:
-
the user's authentification status
-
the current database
-
the id of the event
-
the request body
Output:
- the updated event
update_event_depr
async
update_event_depr(
auth: Annotated[
Auth, Depends(authorize(AuthStrategy.HYBRID, []))
],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[str, Path(alias=eventId)],
body: EditEventBody,
) -> AddEditGetEventResponse
Deprecated. Update an existing event by its ID.
Input:
-
the user's authentification status
-
the current database
-
the event id
-
the request body
Output:
- the updated event