2

I want to access SharePoint data in my application. I am new for this so don't know much about this to access data from SharePoint. I do not have permission on all pages in SharePoint so need to access specific .aspx page(like https://example.sharepoint.com/IT/Lists/Projects2014/AllItems.aspx) to list all data in grid.

How can I implement this using SharePoint REST API? I do not want to create SharePoint 2013 app but want to use SharePoint REST API to get data. So what should be REST API URL to get above link data.

I just want to access that list data using JavaScript/jquery, it may be command line app.

Is this possible to access SharePoint data using SharePoint REST API with normal web application (It should not be SharePoint 2013 app)?

3

I guess you want to fetch List items using REST Api.

Below is the endpoint for REST.

<site URL>/_api/lists/getbytitle('listname')/items

If you want more details, you can look into below URL, which is fetching data from SharePoint List using Javascript and REST API: http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx

  • Thank you for your quick response. I have some questions. Firstly, please let me know that how /lists/getbytitle('listname')/items can be used with example.sharepoint.com/IT/Lists/Projects2014/AllItems.aspx url. Secondly, in the link you referred, there is use of "SP.ClientContext(siteUrl)". Can we use it in simple web application without using sharepoint 2013 app as I don't want to use sharepoint 2013 app to fetch data at all. I want to use simple web application or javascript. Thanks in Advance, Ankita Agrawal – user33004 Sep 2 '14 at 6:10
  • 1
    I guess your url will be "example.sharepoint.com/IT/_api/web/lists/…" . n yes you can use it in simple web application without using sharepoint App. You can put all this code in simple .js file and refer it in your code as per your requirement. I suggest you to go throw the blog carefully. It will resolve all your queries. Happy coding :) – Amit Sep 2 '14 at 6:21
  • 1
    @user33004 SP.ClientContext() is for using JSOM, not REST. Read further down the link for details on REST. REST uses $.ajax(), or, SP.RequestExecutor.executeAsync(), if you're using the cross-domain library. – wjervis Sep 2 '14 at 11:53

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.