From 362aafaf7ed79e2409d9a03b6f07bddc57c0b10e Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 30 Jan 2025 20:41:30 +0100 Subject: [PATCH] Set a hard limit of 100 invocations per request in api/invocations and set a default limit of 20. The UI uses chunks of 20. --- lib/galaxy/webapps/galaxy/api/workflows.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/workflows.py b/lib/galaxy/webapps/galaxy/api/workflows.py index b52d495d40e6..bd1313d335a6 100644 --- a/lib/galaxy/webapps/galaxy/api/workflows.py +++ b/lib/galaxy/webapps/galaxy/api/workflows.py @@ -1265,6 +1265,7 @@ def get_landing( Optional[int], Query( ge=1, + le=100, title="Limit", description="Limit the number of invocations to return.", ), @@ -1328,7 +1329,7 @@ def index_invocations( sort_by: InvocationsSortByQueryParam = None, sort_desc: InvocationsSortDescQueryParam = False, include_terminal: InvocationsIncludeTerminalQueryParam = True, - limit: InvocationsLimitQueryParam = None, + limit: InvocationsLimitQueryParam = 20, offset: InvocationsOffsetQueryParam = None, instance: InvocationsInstanceQueryParam = False, view: SerializationViewQueryParam = None, @@ -1382,7 +1383,7 @@ def index_workflow_invocations( sort_by: InvocationsSortByQueryParam = None, sort_desc: InvocationsSortDescQueryParam = False, include_terminal: InvocationsIncludeTerminalQueryParam = True, - limit: InvocationsLimitQueryParam = None, + limit: InvocationsLimitQueryParam = 20, offset: InvocationsOffsetQueryParam = None, instance: InvocationsInstanceQueryParam = False, view: SerializationViewQueryParam = None,