0

I need to display 2 dropdowns to user, first populated with all subsites in a site collection that have at least one discussion list; and second dropdown with all the discussion lists available in a given subsite. The discussion lists may or may not have items in it. Can we get such a list of lists by REST API query?.

I have already tried using search API to filter based on discussion content type, this does return all discussion items and I can get a list of subsites that contain these items. But if any subsite contains empty discussion list it wont be traceable.

search APi query i am using currently:

/_api/search/query?querytext='ContentType:Discussion+path:<subsite path>

Please note that i am working in SharePoint online environment so kindly suggest solution accordingly.

0

finally found a solution to this problem. I used below REST API query to fetch list of discussion lists:

https://YourSiteUrl/_api/web/lists?$select=Title&$filter=BaseTemplate eq 108

Hope this helps others with same problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.