0

First, please assuming that my company domain name is www.aaa.com, and I am trying to reterieve a list data from the SharePoint list REST endpoint. The list that I am trying to access is used in the following webpage: http://www.aaa.com/tpn/toolcenter/esri/Pages/Portal/Portal.aspx. And I can get the list names with: http://www.aaa.com/_vti_bin/ListData.svc/, and I think the list name that I am looking for is called "Pages".

Then I am trying to compose the Odata REST url to get the list data from browser but failed. The url that I tried is: http://www.aaa.com/sites/_api/lists/GetByTitle('Pages')

The error messsage that I get is http 404. Could anyone please let me know what might be wrong for my Odata Url?

Appreciate your help very much!

1
  • are you using SharePoint 2010 ? If not, which version?
    – Mike
    Commented Nov 30, 2017 at 0:26

2 Answers 2

0

Since your pages exist under http://www.aaa.com/tpn/toolcenter/esri use:

http://www.aaa.com/tpn/toolcenter/esri/_api/web/lists/GetByTitle('Pages')

0

url:_spPageContextInfo.webServerRelativeUrl+"/_api/web/lists/getByTitle('YourListName')/items

But According to me for checking purpose you have to give your site name hard coded in url.

"_spPageContextInfo.webServerRelativeUrl" this will take name of your site dynamically.

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.