Forum Discussion

imbourg's avatar
imbourg
Copper Contributor
Dec 06, 2018
Solved

SharePoint REST API: How to retrieve all folders in a list?

Hello All, Does SharePoint allow to retrieve all folders in a List? (Not a Doc Library). Just a basic List. I am using SharePoint Online. I tried /_api/web/lists/GetById('${ListID}')/Folders witho...
  • Joel Rodrigues's avatar
    Dec 07, 2018

    Hi imbourg

     

    You can filter by content type for example.

    /_api/web/lists/GetByTitle('Documents')/items?$filter=ContentType eq 'Folder'

    From here you can then select and expand other properties to return what you need.

     

    Hope this helps

Resources