yandex / yandex_tracker_client

Python client for working with Yandex.Tracker Api
Other
59 stars 22 forks source link

is it possible to get more than 10000 worklogs? #5

Open skromez opened 3 years ago

skromez commented 3 years ago

Hi, I'm trying to fetch all the existing work logs through your API

worklogs = TrackerClient().worklog.find()
for worklog in worklogs:
   print(worklog.id)

this code works fine until I'm exceeding the 10000th work log, then API throws a 400 error which says: Request exceeds 10000 items limit

How do I get ALL the existing work logs if there's more than 10000 of them?

ljql commented 2 years ago

Hello.

Try to use filters for worklog searching.

Filter createdAt will help you to get disjoint results in several consecutive requests https://github.com/yandex/yandex_tracker_client/blob/master/yandex_tracker_client/collections.py#L1013

All tracker clients are based on api. Full documentation see in https://cloud.yandex.com/en-ru/docs/tracker/concepts/issues/get-worklog