Return top-level folder via Python with the ListFoldersRequest API call (2019-01-25)
Original post: Doug Costain, Moderator, January 25, 2019 at 3:17 PM
Posted on behalf of Charles Barbour ~ Notre Dame
We're having an issue with the ListFoldersRequest API call.
You can set "ParentFolderId" to GUID.empty({00000000-0000-0000-0000-000000000000}) to return the top level folders. However, GUIDs aren't supported by Python - I think it's from C# - and there's no clear way to retrieve the top level folders in Python. Using the Python equivalent GUID - UUID - does not work, nor does setting ParentFolderId as '00000000-0000-0000-0000-000000000000' or None.
Responses:
Doug Costain , Moderator, February 1, 2019 at 9:38 AM
Hi Charles,
Setting the “ParentFolderId” to '00000000-0000-0000-0000-000000000000' in Python should return only top level folders, as long as you are not also using a searchQuery. The API does not support using a searchQuery with only top level folders, and would treat the request as if the ParentFolderId was not set, returning all matching folders, and not just the top level folders.
Thanks,
Kevin Baum