Post AhpKiz3fxubaOSeLi4 by hadez@chaos.social
 (DIR) More posts by hadez@chaos.social
 (DIR) Post #AhpKiz3fxubaOSeLi4 by hadez@chaos.social
       2024-05-06T12:33:30Z
       
       0 likes, 0 repeats
       
       I really LOVE when APIs give paginated results without telling me explicitly, that the results are paginated. (#sarcasm, in case it was not quite obvious)I'm looking at you, #kimai /api/timeseries interface.If I tell you to give me all data between 2024-04-01 and 2024-04-30 I do not expect you to just quietly give me the first N results of that query.Next up: why demand time in timestamps and then ignore it for the query, causing me to miss entries of the last day?
       
 (DIR) Post #AhpKizkZOQusXUibZI by hadez@chaos.social
       2024-05-06T12:43:26Z
       
       0 likes, 0 repeats
       
       I do know about https://www.kimai.org/documentation/api-pagination.htmlBut where do I not look when using curl to fetch data? You guessed right: headers. Sure.Also, documentation seems to imply that if I want pagination, just add page/size params.Yes, but default is to paginate with a predetermined size, even if no param is given.And if you look for API docs, you get directed at the demo instance's swagger file.Which does not suggest looking at the pagination docs ;)
       
 (DIR) Post #AhpKj0cSA61BEbvdYW by hadez@chaos.social
       2024-05-06T12:58:31Z
       
       0 likes, 0 repeats
       
       Ultimate solution: scrap the 20 line workaround for a single line with size=10000000 in the query (unreasonably large but not quite MAX_INT).Question remains: why does the doc suggest this already is the default behavior, while it isn't :(