Now many information can be loaded from browser through REST. This is a quick links list to show what you can expose,
First, In IE, needs to go to Internet Options -> Content tab -> feeds and web slices -> settings
uncheck "turn on feed reading view"
http://spsite/_api/web - list all SharePoint related information
http://spsite/_api/web/lists - all the SharePoint site lists
http://spsite/_api/web/lists/getbytitle('listname') - specific list information
http://spsite/_api/web/lists/getbytitle('listname')/items - show the list data
http://spsite/_api/web/lists/getbytitle('listname')/items(int) - show the list data by id
http://spsite/_api/web/lists/getbytitle('listname')/items(int)?$select=Title,Field1,Field2 - only select the list fields
http://spsite/_api/web/lists/getbytitle('listname')/items?$filter=Title eq 'title' fitler the data
The reference can be found out in http://www.odata.org -> document -> URL Convention
Here has a very good tutorial about how to do write operation in REST, and how to consume it in JSON data.
No comments:
Post a Comment