I've got a sharepoint site with multiple site collections.
/
site collection:
http://mysite/ <--- root site in `/` site collection
http://mysite/subsite1
http://mysite/subsite2
/sitecol1
site collection:
http://mysite/sitecol1/ <-- root site in `/sitecol1` site collection
http://mysite/sitecol1/mysubsiteinsitecol1
http://mysite/sitecol1/mysubsiteinsitecol2
Using rest api, how can I given http://mysite/sitecol1/mysubsiteinsitecol2
determine what root site colleciton it is from?
UPDATE:
Forgot to mention - I need this to work on SharePoint 2010, 2013 and 2016.