I want to get all the List of specified Site from SharePoint OnLine by RESTful API. The URL I used is Https://mySiteUrl/_api/web/lists. But Why the result contains the Document Libaray item(I added it for test)? And another question why the items shows in the web page is 12. But the result is 24 ? What exactly return of _api/web/lists? Thanks.

All Site Collections can be seen in my the SharePoint Online(Trial version).

enter image description here

All site content can be seen for the specified site.

enter image description here

The query result of JSON. enter image description here

enter image description here

1 Answer 1


The '_api/web/lists' will return all the 'Lists' in a SharePoint Site. In SharePoint, a 'Document Library' is considered a type of List, that's why it's showing up in your results.

  • oh .. So How to identify List or Document Library from the result ? And What about my second question. Why the result count is 24? Thanks.
    – Joe.wang
    Sep 4, 2014 at 4:14
  • The third property listed in the JSON Viewer application "Base Template" is what you can use to identify the List Type. A standard list is '100', a Document Library is '101'. Here's a reference: msdn.microsoft.com/en-us/library/… The reason there are 24 results is because some lists are hidden from the user interface, that's the "Hidden" Property in your JSON Viewer. Sep 4, 2014 at 4:53

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.