Using SharePoint Online, I'm trying to retrieve a list of all sites and subsites.
This API gives me all top level sites, but no subsites:
https://{mycompany}.sharepoint.com/_api/search/query?querytext=%27contentclass:sts_site%27
This API gives me all sub-sites of the root top level site:
https://{mycompany}.sharepoint.com/_api/search/query?querytext=%27*%27&trim&refinementfilters=%27contentclass:equals(%22STS_Web%22)%27
I'd like a single query which retrieves all sites and all of their subsites -- not just subsites of the root site.