I am trying to get all subsites from a parent web using REST API. I tried following query which shows "The page cannot be found".


3 Answers 3


Suppose, your site url is like this: http://yourcompany.com/sites/projects

Then in order to get sus site under projects site use:


Suppose you have site under projects named "Project1" and you want to find subsite under it, then use:

  • thanks, unfortunately the url can be changed. I wanted to get all siblings by going up one step and get all subsites.
    – Medes
    Mar 10, 2014 at 8:37

The following REST endpoint


will return the collection of sub webs (WebInfo objects) under root web

Using Search REST API

The following REST query demonstrates how to find all webs under the specified path:

  • thanks, this piece of code is running almost everywhere and I want to get all siblings by going up only one step and get all subsites.
    – Medes
    Mar 10, 2014 at 8:35
  • Medes,in that case you could utilize search based approach in order to return all webs, the answer has been updated. Mar 10, 2014 at 8:52
  • yes, still I need to have a dynamic value of "Path"? am I right?
    – Medes
    Mar 10, 2014 at 9:03
  • it depends, you could specify site collection path (static), or if needed to return results relative to specific parent web, then path should be constructed (dynamic) Mar 10, 2014 at 9:17
  • Vadim, I tested your query but it didn't work,
    – Medes
    Mar 10, 2014 at 10:30

For up to date list (contrary to search) that also works for users with read-only permissions (contrary to /_api/web/webs), use this REST api:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.