# \[CMS API\] Get folders/files from Home/Root.

**URL:** <https://community.hubspot.com/t/cms-api-get-folders-files-from-home-root/44320>\
**Category:** HubSpot Ideas\
**Tags:** file-manager\
**Created:** [September 24, 2021, 9:40am UTC](https://community.hubspot.com/t/cms-api-get-folders-files-from-home-root/44320 "2021-09-24T09:40:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JGudmundsson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jgudmundsson/32/22074_2.png) [@JGudmundsson](https://community.hubspot.com/u/JGudmundsson)\
**Post date:** [September 24, 2021, 9:40am UTC](https://community.hubspot.com/t/cms-api-get-folders-files-from-home-root/44320/1 "2021-09-24T09:40:11Z")

</div>

TLDR; It should be possible to get the files or folders from the Root/Home level in the HubSpot File Manager with the search API (already works for sub-levels) for example with the parameters parentId=null or path=“/”.

With the V3 Files search API you are able to get files or folders from a specific folder.

You are however not able (confirmed by HubSpot support) to get files or folders from the Home/Root folder of the File Manager. Meaning as of posting this idea, it is not possible to request the root level, and then continue down to sub-levels. Your only option is to start at a sub-level or to request all the files/folders in the entire HubSpot file manager.

This is needed for a lot of features that need to traverse the files/folder hierarchy. For example, a feature the mirrors the HubSpot web Browse Files feature.

---

<div class="post-metadata">

**Author:** ![aluque](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aluque/32/78108_2.png) [@aluque](https://community.hubspot.com/u/aluque)\
**Post date:** [September 24, 2021, 3:40pm UTC](https://community.hubspot.com/t/cms-api-get-folders-files-from-home-root/44320/2 "2021-09-24T15:40:18Z")

</div>

Hey there!

I’m not sure why support was giving that as an answer, but you can in fact search for files/folders in the root. All you need to do is use the `parentFolderId=0`. That will give you all items in the root.

---

<div class="post-metadata">

**Author:** ![JaiGohil](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@JaiGohil](https://community.hubspot.com/u/JaiGohil)\
**Post date:** [March 27, 2023, 12:46pm UTC](https://community.hubspot.com/t/cms-api-get-folders-files-from-home-root/44320/3 "2023-03-27T12:46:20Z")

</div>

Can anyone point how to get files and folders from root directory?  
I’ve tried all the paths but none of them worked till now..
