Question

I have tried both CAML query and REST API to retrieve data from the Discussions List in the community site but I am unable to accesss the Replies column.

How to access this column and sort data?

Please help.

Was it helpful?

Solution

To get the list of replies

_api/lists/getByTitle('listname')/items?$filter=ContentType eq 'Message'

or

/_api/lists/getByTitle('listname')/items?$filter=FSObjType eq 0

To get the list of Discussions with the replies count:

/_api/lists/getByTitle('listname')/items?$select=ID,Title,Body,Folder/ItemCount &$expand=Folder/ItemCount &$filter=ContentType eq 'Discussion'
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top