When communicate with Office or SharePoint APIs, its important fact that knowledge on representational transfer protocol and OData protocols while moving with deep customization’s.
what is REST (Representational State Transfer)?
In simple terms REST is all about below;
- Predefined set of stateless operation which identified by URL
- Responses may contain HTML, JSON, XML or any other defined format which supported
- GET, POST, PUT, DELETE are most common forms of HTTP verbs
GET: http:///_api/web/lists/GetByTitle('Test') GET: https://outlook.office.com/api/v2.0/me/MailFolders/sentitems/messages/
what is OData (Open Data Protocol)?
- Equipped with query and creational capabilities on REST APIs
- Initiated by Microsoft in year 2007
- Format [http or https]://<REST Endpoint URL>/<query>
http://<end point URI>?$select=value&$filter=condition$orderby=value
Standards which are developed with the involvement of community (mostly with developers). Open standards inherited to office 365 API development in following manners;
• Most of Office 365 APIs are exposed as a RESTful APIs
• Its implemented with OData 4.0 (as for year 2016)
OData queries is common standard which elaborated above also included in the SharePoint and Office365 end point data querying. Its ultra simple if you know the basics and played with this. Follow the following links and be expert on this.
Note : If you noticed there are versions associated with most of cloud based endpoints. Cloud services are continuously pushing changes to its services as sooner changes are ready, so then returned patterns may changed for same query. To avoid custom applications get break due to changed on endpoint, it classifies under version metadata. Simply you can pick any version which satisfies your requirement.
Querying SharePoint Endpoints as below;
- Use OData query operations in SharePoint REST requests
- Determine SharePoint REST service endpoint URIs
- Office 365 API Reference