Here a few examples on how to do things with REST in SharePoint 2010. Given the following list:
| Column | Type |
|---|---|
| ProjectName | Single line of text |
| Status | Choice |
| Start | Date and Time |
| Description | Multiple lines of text |
| Sponsor | Person or Group |
| Related Team | Lookup |
| Project Lead | Person or Group |
| Employee Resources | Person or Group |
| Contractor Resources | Person or Group |
| Updates | Multiple lines of text |
| OtherProjectDependencies | Lookup |
| OtherDependencies | Multiple lines of text |
| Requirements Approved Date | Date and Time |
| Design Approved Date | Date and Time |
| Development Completed Date | Date and Time |
| Testing Completed Date | Date and Time |
| Estimated Hours for Project | Number |
If we want to get everything, this will do it:
/_vti_bin/listdata.svc/Projects
To get a specific item, add the ID:
/_vti_bin/listdata.svc/Projects(17)
To get more info from lookup columns:
http://fccsapps/is/projects/_vti_bin/listdata.svc/Projects(17)?$expand=RelatedTeam
To filter on a value in a lookup column:
/_vti_bin/listdata.svc/Projects?$expand=RelatedTeam&filter=RelatedTeam/title contains ‘sharepoint’