Skip to main content

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. 


@Daniel Söderlund If you want to start the thread of API Ideas that we would like to see implemented, I would gladly hop on that train with you!!!!


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


Reply