Skip to content

Events

add_event async

add_event(
    auth: Annotated[
        Auth, Depends(authorize(HYBRID, [ADD]))
    ],
    db: Annotated[AsyncSession, Depends(get_db)],
    body: AddEventBody,
) -> AddEditGetEventResponse

Add a new event with the given details.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, [ADD]))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
body AddEventBody

the request body

required

Returns:

Type Description
AddEditGetEventResponse

the new event

add_event_depr async

add_event_depr(
    auth: Annotated[Auth, Depends(authorize(HYBRID, []))],
    db: Annotated[AsyncSession, Depends(get_db)],
    body: AddEventBody,
) -> AddEditGetEventResponse

Deprecated. Add a new event with the given details.

args:

  • the user's authentification status

  • the current database

  • the request body

returns:

  • the new event

add_tag_to_event async

add_tag_to_event(
    auth: Annotated[
        Auth, Depends(authorize(HYBRID, [TAGGER]))
    ],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int | UUID, Path(alias=eventId)],
    tag_id: Annotated[str, Path(alias=tagId)],
    local: str,
) -> AddRemoveTagEventsResponse

Add a tag to an event by their ids.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, [TAGGER]))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[int | UUID, Path(alias=eventId)]

the event ID or UUID

required
tag_id Annotated[str, Path(alias=tagId)]

the tag ID

required
local str

"1" if local

required

Returns:

Type Description
AddRemoveTagEventsResponse

the result of adding the tag to the event given by the api

delete_event async

delete_event(
    auth: Annotated[Auth, Depends(authorize(HYBRID, []))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int | UUID, Path(alias=eventId)],
) -> DeleteEventResponse

Delete an event either by its event ID or via its UUID.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, []))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[int | UUID, Path(alias=eventId)]

the ID or UUID of the event

required

Returns:

Type Description
DeleteEventResponse

the deleted event

delete_event_depr async

delete_event_depr(
    auth: Annotated[Auth, Depends(authorize(HYBRID, []))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int, Path(..., alias=eventId)],
) -> DeleteEventResponse

Deprecated. Delete an existing event by its ID.

args:

  • the user's authentification status

  • the current database

  • the event id

returns:

  • the deleted event

get_all_events async

get_all_events(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[AsyncSession, Depends(get_db)],
) -> list[GetAllEventsResponse]

Retrieve a list of all events.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required

Returns:

Type Description
list[GetAllEventsResponse]

all events as a list

get_event_details async

get_event_details(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int | UUID, Path(alias=eventId)],
) -> AddEditGetEventResponse

Retrieve details of a specific event either by its event ID, or via its UUID.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[int | UUID, Path(alias=eventId)]

the ID or UUID of the event

required

Returns:

Type Description
AddEditGetEventResponse

the event details

get_event_details_depr async

get_event_details_depr(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int, Path(alias=eventId)],
) -> AddEditGetEventResponse

Deprecated. Retrieve details of a specific attribute by its ID.

args:

  • the user's authentification status

  • the current database

  • the event ID

returns:

  • the event details

index_events async

index_events(
    auth: Annotated[Auth, Depends(authorize(HYBRID))],
    db: Annotated[AsyncSession, Depends(get_db)],
    body: IndexEventsBody,
) -> list[IndexEventsAttributes]

Search for events based on various filters, which are more general than the ones in 'rest search'.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
body IndexEventsBody

the request body

required

Returns:

Type Description
list[IndexEventsAttributes]

the searched events

publish_event async

publish_event(
    auth: Annotated[
        Auth, Depends(authorize(HYBRID, [PUBLISH]))
    ],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int | UUID, Path(alias=eventId)],
    request: Request,
) -> PublishEventResponse

Publish an event either by its event ID or via its UUID. .

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, [PUBLISH]))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[int | UUID, Path(alias=eventId)]

the ID or UUID of the event

required
request Request

the request

required

Returns:

Type Description
PublishEventResponse

the published event

remove_tag_from_event async

remove_tag_from_event(
    auth: Annotated[
        Auth, Depends(authorize(HYBRID, [TAGGER]))
    ],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[UUID | int, Path(alias=eventId)],
    tag_id: Annotated[str, Path(alias=tagId)],
) -> AddRemoveTagEventsResponse

Remove a tag to from an event by their IDs.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, [TAGGER]))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[UUID | int, Path(alias=eventId)]

the event ID or UUID

required
tag_id Annotated[str, Path(alias=tagId)]

the tag ID

required

Returns:

Type Description
AddRemoveTagEventsResponse

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(HYBRID))],
    db: Annotated[AsyncSession, Depends(get_db)],
    body: SearchEventsBody,
) -> SearchEventsResponse

Search for events based on various filters.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
body SearchEventsBody

the request body

required

Returns:

Type Description
SearchEventsResponse

the searched events

start_freeTextImport async

start_freeTextImport(
    auth: Annotated[
        Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))
    ],
    event_id: Annotated[int | UUID, Path(alias=eventID)],
    body: AddAttributeViaFreeTextImportEventBody,
) -> RedirectResponse

Starts the freetext import process by submitting the freetext to the worker.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))]

the user's authentification status

required
event_id Annotated[int | UUID, Path(alias=eventID)]

the event ID or UUID

required
body AddAttributeViaFreeTextImportEventBody

the body of the freetext

required

Returns:

Type Description
RedirectResponse

dict

unpublish_event async

unpublish_event(
    auth: Annotated[Auth, Depends(authorize(HYBRID, []))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int | UUID, Path(alias=eventId)],
    request: Request,
) -> UnpublishEventResponse

Unpublish an event either by its event ID or via its UUID.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, []))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[int | UUID, Path(alias=eventId)]

the ID or UUID of the event

required
request Request

the request

required

Returns:

Type Description
UnpublishEventResponse

the unpublished event

update_event async

update_event(
    auth: Annotated[Auth, Depends(authorize(HYBRID, []))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int | UUID, Path(alias=eventId)],
    body: EditEventBody,
) -> AddEditGetEventResponse

Update an existing event either by its event ID or via its UUID.

Parameters:

Name Type Description Default
auth Annotated[Auth, Depends(authorize(HYBRID, []))]

the user's authentification status

required
db Annotated[AsyncSession, Depends(get_db)]

the current database

required
event_id Annotated[int | UUID, Path(alias=eventId)]

the ID or UUID of the event

required
body EditEventBody

the request body

required

Returns:

Type Description
AddEditGetEventResponse

the updated event

update_event_depr async

update_event_depr(
    auth: Annotated[Auth, Depends(authorize(HYBRID, []))],
    db: Annotated[AsyncSession, Depends(get_db)],
    event_id: Annotated[int, Path(alias=eventId)],
    body: EditEventBody,
) -> AddEditGetEventResponse

Deprecated. Update an existing event by its ID.

args:

  • the user's authentification status

  • the current database

  • the event id

  • the request body

returns:

  • the updated event