function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ccPeterccPeter 

"My Personal Documents" folder missing in folder listing query

In my application I use the REST API to enumerate the folders available in Documents. I use the following query:

"query?q=SELECT+Name,AccessType,IsReadonly+from+Folder"

 

This works fine, except that the only folder records returned are the ones for folders I explicitly created. To my surprise the default "My Personal Documents" folder is not included.

 

Since I would like to give our users the capability to add documents to this default folder too, how can I possibly change my query so that "My Personal Documents" is included in the returned list of folders?

 

Thanks

Peter

SuperfellSuperfell

Its a special case, its never returned with the folder query, to use it, you use the userId as the folderId.

ccPeterccPeter

Hi Simon, thanks for the quick response. The userId you mentioned, is that the id returned with the access_token when the user logs in with oAuth?

 

Peter

SuperfellSuperfell

The 15 or 18 character Id field from User. I believe you can get it by doing a GET on the Id service URL returned from the oauth flow.