This is get time entry api: {{freshservice URL}}/api/v2/tickets/Ticket_id/time_entries
This api returns only 30 entries which are latest for that ticket. is there any pagination available for above api or any other solution?
This is get time entry api: {{freshservice URL}}/api/v2/tickets/Ticket_id/time_entries
This api returns only 30 entries which are latest for that ticket. is there any pagination available for above api or any other solution?
If there nothing in the documentation regarding pagination there are non, that is my experience.
We should create a Idea with bunch of thing we like to see in the API.
Solution would maybe to get them every day and store them in external DB.
I am unsure of how specifically you want to apply this however I have had good luck using the Link values in the header of the API reply
Postman example of this
The Link value will provide the next page for pagination.
Not all queries within Freshservice will provide the next link, I recommend manually verifying queries.
Checking Header info for the following value should help with pagination AND monitor api count
assuming PS, however you should be able to modify the following to your needs.
$APIQUERY.RelationLink.Values will provide the next href link
a check for null will be the end of pagination.
Bonus API Count values:
$apiquery.Headers.'X-Ratelimit-Remaining'
$apiquery.Headers.'X-Ratelimit-Total'
$apiquery.Headers.'X-Ratelimit-Used-CurrentRequest'
These values will allow adjusting api requests delay
These must be used with Invoke-Webrequest
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.