@@ -165,19 +165,22 @@ def find_runs_by_status_and_time_range(
165165 status : List [AtlanWorkflowPhase ],
166166 started_at : Optional [str ] = None ,
167167 finished_at : Optional [str ] = None ,
168+ from_ : int = 0 ,
169+ size : int = 100 ,
168170 ) -> List [WorkflowSearchResult ]:
169171 """
170- Find workflows by status and optional time filters on startedAt and/or finishedAt.
172+ Find workflows based on their status and interval
171173
172174 :param status: list of the workflow statuses to filter
173175 :param started_at: (optional) lower bound on 'status.startedAt' (e.g 'now-2h')
174176 :param finished_at: (optional) lower bound on 'status.finishedAt' (e.g 'now-1h')
177+ :param from_:(optional) starting index of the search results (default: `0`).
178+ :param size: (optional) maximum number of search results to return (default: `100`).
175179 :returns: list of workflows matching the filters
176180 :raises ValidationError: if inputs are invalid
177181 :raises AtlanError: on any API communication issue
178182 """
179183 time_filters = []
180-
181184 if started_at :
182185 time_filters .append (Range (field = "status.startedAt" , gte = started_at ))
183186 if finished_at :
@@ -199,9 +202,9 @@ def find_runs_by_status_and_time_range(
199202 ),
200203 ],
201204 )
202-
203- run_lookup_results = self . _find_runs ( run_lookup_query )
204-
205+ run_lookup_results = self . _find_runs (
206+ query = run_lookup_query , from_ = from_ , size = size
207+ )
205208 return run_lookup_results .hits and run_lookup_results .hits .hits or []
206209
207210 @validate_arguments
0 commit comments