Community
Showing results for 
Search instead for 
Do you mean 
Reply

Paging with Activities

Accepted Solution Solved
Copper Contributor
Posts: 123
Country: Canada
Accepted Solution

Paging with Activities

I have a quick question about Paging with the Activities route.

I am making the call "api/Activities?$top=1" and it ends up returning all of the activities available to the logged in user. Not a single Activity as expected. Should this not return a single Activity?

 

I can make the call "api/Contacts?$top=1" and I get a single Contact returned as expected.

When I add in the $filter to the parameters such as "api/Activities?$skip=0&$top=2&$filter=(contains(Details, 'PWD'))" the filter seems to work but I still get more Activities returned than what I specified in the $top parameter.

I'm fairly new with OData but the documentation seems pretty straight forward.  Is there something I'm missing here?

 

Any help appreciated! Thanks,
-Eric


Accepted Solutions
Solution
Accepted by topic author e_hoog
‎03-29-2016 09:01 AM
Employee
Posts: 236
Country: USA

Re: Paging with Activities

[ Edited ]

Hi Eric,

 

I don't believe activities supports paging yet.  Activites do supports filter, orderby.  You can always check to see what's supported from the OData top right from the API reference page.

 

https://actforweb.actops.com/Act.Web.API/Help/OData

 

It's probably worth noting that because activities are date/time bound, paging can effectively happen by querying for ranges of dates.

View solution in original post


All Replies
Solution
Accepted by topic author e_hoog
‎03-29-2016 09:01 AM
Employee
Posts: 236
Country: USA

Re: Paging with Activities

[ Edited ]

Hi Eric,

 

I don't believe activities supports paging yet.  Activites do supports filter, orderby.  You can always check to see what's supported from the OData top right from the API reference page.

 

https://actforweb.actops.com/Act.Web.API/Help/OData

 

It's probably worth noting that because activities are date/time bound, paging can effectively happen by querying for ranges of dates.

Copper Contributor
Posts: 123
Country: Canada

Re: Paging with Activities

Oh ok that makes sense then.

I see now that in the OData page in the documentation it does not have Paging listed beside the Activities calls.  I apologize for my ignorance.

Under the Definitions section it does say that "Anything that is not implemented will throw an exception upon use" so I guess I was expecting to see an exception if it was unsupported.

Thank you for your quick response!

-Eric

Employee
Posts: 236
Country: USA

Re: Paging with Activities

[ Edited ]

No problem, and we are both enhancing the documentation as well as OData support across the board, stay tuned.

 

Good point about the documentation saying not implemented will return an error - I don't think that's valid or at least not always.