BI-System mit OData und SharePoint Online
by Martina Grom, MVP Office 365, und
Toni Pohl, MVP Windows Platform Development
SharePoint Konferenz ppEDV in Erding, March 2015
atwork information technology, atwork.at
2. Über uns
Martina Grom
Working on:
The Cloud
Office 365 Deployments
Enterprise Social Engagements
Kontakt:
Twitter: @magrom
E-Mail: mg@atwork.at
Blog: http://blog.atwork.at
Facebook: https://www.facebook.com/groups/cloudusergroup/
3. Über uns
Toni Pohl
Working on:
The Cloud
Azure
Kontakt:
Twitter: @atwork
E-Mail: tp@atwork.at
Blog: http://blog.atwork.at
Facebook: https://www.facebook.com/groups/cloudusergroup/
15. OData
The Protocol for REST APIs
An open protocol to allow the creation and consumption
of queryable and interoperable RESTful APIs in a
simple and standard way.
http://www.odata.org/
16. OData auf einen Blick
Ein OData service liefert per Default Atom XML
Für JSON muss im HTTP Header JSON angegeben werden
OData für Abfragen und auch für CRUD Operationen
(HTTP verbs: GET for reading, PUT for creating, POST for
updating and DELETE for deleting)
OData ist case-sensitive für Properties, filters…
17. Get started with the SharePoint 2013 REST service
https://msdn.microsoft.com/en-
us/library/office/fp142380.aspx
Grafik: https://msdn.microsoft.com/en-us/library/office/fp142380.aspx
18. OData in SharePoint 2013:
_api ist das neue _vti_bin/client.svc
Grafik: http://blog.concentra.co.uk/2013/02/06/odata/diagram1/
19. OData in SharePoint 2013: Service Access Points
Site http://server/site/_api/site
Web http://server/site/_api/web
User Profile
http://server/site/_api/SP.UserProfiles.PeopleManager
Search http:// server/site/_api/search
Publishing http:// server/site/_api/publishing
20. OData in SharePoint: Query-Beispiele
https://spkonf.sharepoint.com/sites/dev/_api/web
/lists/getbytitle('ratings')/items?$select=Title,RatingSpeaker
/lists/GETbytitle('ratings')/items?$filter=Title eq 'SESSion2‘
/lists/getbytitle('ratings')/items?$top=2&$select=Title
/lists(guid'852d5762-6032-4150-a550-ff01db0c5517')/Items(2)
siehe auch:
https://msdn.microsoft.com/en-us/library/office/fp142385.aspx
Use OData query operations in SharePoint REST requests
https://msdn.microsoft.com/en-us/library/office/fp142385.aspx
Die „Methoden“ GetByTitle(),
lists() etc. sind OData Extensions
um das Service einfacher zu
verwenden
22. OData Beispiele für SP
https://github.com/OfficeDev/OData-BCS-SharePoint-Hosted-
App-Code-Sample
http://tomresing.com/2014/05/19/odata-bcs-code-sample-from-
teched-2014/
OData in SharePoint 2013 with jQuery
http://blog.concentra.co.uk/2013/02/06/odata/
OData mit BCS? Ja!
Using OData sources with Business Connectivity Services in
SharePoint 2013
https://msdn.microsoft.com/en-us/library/office/jj163802.aspx
http://blog.concentra.co.uk/2013/02/06/odata/
For example/_api/web/lists/GetByTitle('Calendar')/fields/getbyid('<guid>') would return information about a single field on the Calendar list.
The ‘methods’ which the SharePoint OData service use (eg GetByTitle andGetById) are extensions to the OData protocol to make the service more usable.
If you have experience with the CSOM you can leverage this knowledge as the OData service can be called using syntax that is very similar. A good reference on this can be found here.