Trimble Connect User Forum

 Get activities using REST calls

posted 04-07-2021 05:44
Hello,

When using API calls I receive a list of only 25 activities. There is any way to increase the number of activities retuned?


The activities can be retrieved using TrimbleConnect API NET SDK (NuGet package) ?



Thank you.
The /activities API provides two ways of managing paging - by default the page size is 25 as you've noticed:

1. You can use the lastId parameter to fetch 25 activities after the last activity id you previously received.
2. You could use the Range: items=N-M header for custom paging, but based on a quick test this does not work as expected - I filed a bug for this.

The TC .NET SDK does provide support for fetching activities using projectClient.Activities.GetAllAsync() where the lastId parameter can be set via the parameters dictionary.

Best regards,

     Veni