REST API Itemcount with date filter does not work

developer sp1 461 Reputation points
2020-08-21T06:37:23.927+00:00

The following returns 20 items from a list

https://webapp1/_vti_bin/ListData.svc/DiscussionsList/$count?$filter=((Created ge datetime'2018-01-01T00:00:00Z') and (Created le datetime'2020-12-31T00:00:00Z'))

however the following returns the count of all items in the same list which is 25 in my case

https://webapp1/_api/web/Lists/getbytitle('Discussions%20List')/ItemCount?$filter=((Created ge datetime'2018-01-01T00:00:00Z') and (Created le datetime'2020-12-31T00:00:00Z'))

Not sure if this is REST limitation. please help to advise if I missed something. Thanks

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,599 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful