I'm using the REST Files API, as documented here, to read the content of an Online Sharepoint (Office 365) site.
Is it possible to get the sub-sites the root site using this API?
I understand I can get a list of sub-sites using the traditional SharePoint API (https://<my-domain>.sharepoint.com/_api/site/rootWeb/webinfos
), but I'd rather use the files API because I'm using it for other purposes as well.
(Note that the two APIs are very different. One example: getting the child-elements of a folder in the files API is done using GET {base-url}/Files/{folder-id}/children
, which it's done using http://<site url>/_api/web/getfolderbyserverrelativeurl('/<folder name>')/folders
in the 'classic' API).
In addition, once I get the list of sub-sites - using the above endpoint or any other means - is it possible to traverse / read these sub-sites using the files REST API?
https://<my-domain>.sharepoint.com/_api/web/webinfos
What sort of content are you intent on reading from the subsites?