Javascript and REST API to get all lists Shareoint 2013


  • Hi,

    I am using Javascript and REST in a Sharepoint-hosted app to get all lists in a sharepoint 2013 site. For this I have used the request URL as

    url : appWebUrl +"/_api/SP.AppContextSite(@target)/web/lists?@target='"+hostUrl +"'",

    This works well. I did not understand why cant cant we simply use this to make the call.

    url : hostUrl +"/_api/web/lists,

    Does it have to do anything with authenticating the app to the host site by passing the context ?

    Monday, September 02, 2013 7:08 AM