Say you have a Site named https://beyondhard.sharepoint.com/sites/TestPrivate in the SharePoint Online.

I tried the url https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists?$filter=Hidden%20eq%20false&$expand=items. It can get all the visible List and the ListItem of them. But I also want to get all the properties including other deferred properties of ListItem like File,RootFolder etc. Is it possible to be done? How can I make it ?



  • I tried the URL https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists?$select=Title,items,RootFolder&$filter=Hidden%20eq%20false&$expand=RootFolder,items/file. Is it right ? Thanks. – Joe.wang Sep 18 '14 at 10:43
  • How to select all the properties and expand all properties. I wonder it there is something like * to represent all properties. Thanks. – Joe.wang Sep 18 '14 at 10:44

According to OData specification:

The syntax of a $expand query option is a comma-separated list of Navigation Properties. Additionally each Navigation Property can be followed by a forward slash and another Navigation Property to enable identifying a multi-level relationship.

In your example, List Item resource does not expose RootFolder property, i guess you mean List resource, that case your request could look like this:

/_api/web/lists?$filter=(Hidden eq false)&$select=Title,Items,RootFolder,Items/File&$expand=Items,Items/File,RootFolder
| improve this answer | |
  • 1
    Yeah! It is a mistake. RootFolder is the property of List. :) You are good helper. Thanks you posting the OData link. – Joe.wang Sep 19 '14 at 1:31
  • I wondered if there is asterisk wildcard like * in sql to $select all properties. Thanks. – Joe.wang Sep 19 '14 at 3:45
  • 2
    @Joe.wang Yes, you can use "$select=*" in the GET query. – Karim AG Nov 4 '15 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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