diff --git a/service/src/main/inse/works/service.py b/service/src/main/inse/works/service.py index 12ed15f3..8f6c20b6 100644 --- a/service/src/main/inse/works/service.py +++ b/service/src/main/inse/works/service.py @@ -101,11 +101,24 @@ async def get_primary_topic_counts( async def get_topics_by_time_by_author( author_id: Annotated[str, Path(description="The author id, for example A5023888391.")], max_topics_per_year: Annotated[int, Query(description="The maximum number of topics per year.", ge=1, le=20)] = 3, + target_publications: Annotated[ + int, + Query( + description="Target number of publications used for the timeline. Complete years are always included.", + ge=1, + ), + ] = 300, + include_all: Annotated[ + bool, + Query(description="If true, all publications are used for the timeline."), + ] = False, principal: security.Principal = Depends(security.roles_allowed(["SUPER_ADMIN", "UNI_ADMIN"])), ): return await logic.get_topics_by_time_by_author( author_id, max_topics_per_year=max_topics_per_year, + target_publications=target_publications, + include_all=include_all, )