I'm trying to work with Office 365 Files REST API which works just fine except one thing that I'm struggling with.
What I need for my application is to make an explorer like browse capability for OneDrive for business Document Library.
My problem is that I don't know how to get the direct children in the root of the Document library
The API request GET ../_api/files will retrieve all files and folders in the default document library, including files and folders from sub-directories.
What I need is basically the functionality of the API request GET ../_api/files(<folder_path>)/Children that works also for the root folder of the Document library. The problem is that I couldn't find a way set <folder_path> as the root folder.
I found out that the API call ../_api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Folders and _api/web/getfolderbyserverrelativeurl(<folder_server_relative_path>)/Files works as expected resulting the only the direct children of the root folder if the folder_server_relative_path is the path of the document library. The problem with this API call is that it's requires server relative path of the (default) document library (which i don't have) and the result has a different schema compared to the ../_api/files REST API call.
Can somebody help me with this problem?
David