REST and OData are the foundation of data access in a cloud-based world. Office and SharePoint developers are well aware of the new RESTful endpoints available in SharePoint 2013 and may have already consumed some publically-available RESTful endpoints from the Internet. Many apps, however, will require their own RESTful service for accessing custom app data. In this session, we’ll cover the fundamentals of creating custom RESTful services with WebAPI 2 and consuming those services in Office and SharePoint apps. Additionally, the session will present approaches for securing your custom services and accessing them across domains. Attendees will exit the session ready to build custom RESTful services for their Office and SharePoint apps.
Session “Build your own REST service with WebAPI 2” by Scot Hillier – here are my notes.
Level 400 – yes!
REST
Client pulls data – stateless, cache indication, accessible through a url.
WebAPI
- Framework to create Restful, oData, custom http based services.
- Part of ASP.net MVC
- Stand-alone or as part of an app
Controllers
Basic methods are mapped to http verbs, you can control this through routing:
/api/{controller}/{id}
Content Negotiation
WebAPI services return what you request – xml or json.
Demo
Scot always show many demos, like it – he showed how to create the service,
OData
A Protocol to query data in a standardized, restful way.
Security
- Use SSL
- Validate calling domain in CORS scenario (there is a nuget package for that).
Summary
Scot Hillier. Solid. Will try this soon, I have a project that is perfect for that.
Share this post
Twitter
Facebook
LinkedIn
Email