1

I would like to know how to access a list of sites with the ListData.svc REST API.

Thanks.

3
  • which version of SharePoint are you using?
    – lwbecker2
    Mar 17, 2014 at 16:59
  • If you are using SP 2013, then use Alex's suggestion. If you are using SP 2010 you will need to use the JavaScript Client Object Model to get this information. Mar 17, 2014 at 17:17
  • 2010 and REST is a MUST
    – user24423
    Mar 17, 2014 at 18:19

2 Answers 2

2

The REST interface uses flexible URL conventions for querying data, which enable you to filter, sort and select information from SharePoint Foundation lists directly from the browser.

The ListData.svc is for getting information from lists and libaries not for getting a list of sites.

Link to MSDN

3
  • I know, but, is there a list containing the sites. SPList with SPListItem about sites.
    – user24423
    Mar 16, 2014 at 9:22
  • Not that I know
    – Remko
    Mar 16, 2014 at 9:25
  • As far as I know, there is no such list. Mar 16, 2014 at 17:43
0

Webs will get you all the sites directly beneath the site, but not their children according to MSDN

http://<sitecollection>/<site>/_api/web/webs
3
  • 1
    _api and ListData.svc are not the same thing. Mar 17, 2014 at 17:34
  • Ah, my mistake. I momentarily mixed up client.svc and listdata.svc. I'll leave the answer in case anyone needs it for 2013, but feel free to downvote it as it doesn't answer the question.
    – athom
    Mar 17, 2014 at 18:05
  • No problem. We have a hard enough time getting people to upvote anything around here... Mar 17, 2014 at 18:12

Your Answer

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