Wednesday, May 04, 2011

How to retrieve a SharePoint list using rest

I’m using this so often these days and I keep forgetting the url to use, so I thought I’d put it here so I could find it.

http://sp2010a/teamsite/_vti_bin/listdata.svc

To retrieve information for a single list

http://sp2010a/teamsite/_vti_bin/listdata.svc/Contacts

Or perhaps just a single contact (in this case, the one with ID = 1)

http://sp2010a/teamsite/_vti_bin/listdata.svc/Contacts(1)

No comments: