SlideShare a Scribd company logo
1 of 16
1
Presentation on OData
What is OData
• Open Data Protocol (OData) is an open protocol for sharing data.
• It is built upon AtomPub, itself an extension of Atom Publishing Protocol.
[The Atom Publishing Protocol (AtomPub) is an Application level protocol for
publishing and editing web resources.]
• OData is based on REST (Representational State Transfer) ; therefore a simple web
browser can view the data exposed through an OData service.
• The basic idea behind OData is to use a well known data format (Atom feed) to
expose a list of entities.
• AtomPub extends the basic Atom Protocol by allowing not only read but the whole
set of CRUD operations.
2
• Atom is an XML-based document format that describes Collections of
related
• information known as "feeds". Feeds are composed of a number of items,
known as Entries.
3
How OData Works: Technology Basics
4
• The OData technology has four main parts:
1. OData data model
2. OData protocol
3. OData client libraries
4. OData service
1. The OData data model, which provides a generic way to organize and
describe data.
2. The OData protocol, which lets a client make requests to and get
responses from an OData service. Those interactions include the usual
create/read/update/delete (CRUD) operations, along with an OData-
defined query language.
3. OData client libraries, which make it easier to create software that
accesses data via the OData protocol. Because OData relies on REST,
using an OData-specific client library isn't strictly required. But most
OData clients are applications, and so providing pre-built libraries for
making OData requests and getting results makes life simpler for the
developers who create those applications.
4. An OData service, which exposes an endpoint that allows access to data.
This service implements the OData protocol, and it also uses the
abstractions of the OData data model to translate data between its
underlying form, which might be relational tables, SharePoint lists, or
something else, into the format sent to the client.
5
Consumption of Odata Example
1. Requesting resources : Foe example here we use the service of an open trip
management system .
If a person named Russell White, who has formerly registered TripPin, would like
to find out who are the other people in it.
GET http://services.odata.org/v4/TripPinServiceRW/People HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
This uses version 4
TripPin from where it fetch
data
List of people whose data are retrieved
HTTP Version 1.1
6
In Response
• HTTP/1.1 200 OK
• Content-Length: 1007
• Content-Type: application/json; odata.metadata=minimal Service Route URL Resource path
• OData-Version: 4.0
• {
• "@odata.context":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/$metadata#People",
• "@odata.nextLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People?%24skiptoken=8",
• "value":[
• {
• "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')",
• "@odata.etag":"W/"08D285C0E2748213"",
• "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')",
• "UserName":"russellwhyte",
• "FirstName":"Russell",
• "LastName":"Whyte",
• "Emails":[
• "Russell@example.com",
• "Russell@contoso.com"
• ],
• "AddressInfo":[
• {
• "Address":"187 Suffolk Ln.",
• "City":{
• "CountryRegion":"United States",
• "Name":"Boise",
• "Region":"ID"
• }
• }
• ],
• "Gender":"Male",
• "Concurrency":635717560892162579
• },
• {
• ......................................
• }
• ]}
7
2. Requesting an individual resource
GET http://services.odata.org/v4/TripPinServiceRW/People('russellwhyte') HTTP/1.1
OData-Version: 4.0 User name of the individual
OData-MaxVersion: 4.0 Resource
3. Queries
GET http://services.odata.org/v4/TripPinServiceRW/People?$top=2 &
$select=FirstName, LastName & $filter=Trips/any(d:d/Budget gt 3000) HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
8
In Response
• HTTP/1.1 200 OK
• Content-Length: 367
• Content-Type: application/json; odata.metadata=minimal
• OData-Version: 4.0
• {
•
"@odata.context":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/$metadata#People(FirstNam
e,LastName)",
• "value":[
• {
• "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')",
• "@odata.etag":"W/"08D285C0E2748213"",
•
"@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')",
• "FirstName":"Scott",
• "LastName":"Ketchum"
• },
• {
• "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('ronaldmundy')",
• "@odata.etag":"W/"08D285C0E2748213"",
•
"@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('ronaldmundy')",
• "FirstName":"Ronald",
• "LastName":"Mundy"
• }
• ]
• }
9
4. Creating a new resource
POST http://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/People HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
Content-Length: 428
Content-Type: application/json
{
"UserName":"lewisblack",
"FirstName":"Lewis",
"LastName":"Black",
"Emails":[
"lewisblack@example.com"
],
"AddressInfo":[
{
"Address":"187 Suffolk Ln.",
"City":{
"CountryRegion":"United States",
"Name":"Boise",
"Region":"ID"
}
}
],
"Gender":"Male",
"Concurrency":635519729375200400
}
10
In Response
HTTP/1.1 201 Created
Content-Length: 652
Content-Type:
application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=f
alse;charset=utf-8
ETag: W/'08D1D3800FC572E3'
Location:
http://services.odata.org/V4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/Peop
le('lewisblack')
OData-Version: 4.0
NOTE :- IEEE754Compatible=false ;= means that Int64(Represents a 64-bit signed
integer.) and Decimal are serialized as numbers.
11
5. Relating resources
In RESTful APIs, resources are usually dependent with each other. For that, the concept
of relationships in OData can be defined among resources to add flexibility and
richness to the data model.
Example -
POST
http://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/Peop
le('lewisblack')/Trips/$ref HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
Content-Length: 123
Content-Type: application/json
{
"@odata.id":"http://services.odata.org/V4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinSer
viceRW/People('russellwhyte')/Trips(0)"
}
12
In Response
HTTP/1.1 204 No Content
OData-Version: 4.0
6. Invoking a Function
OData supports defining functions and actions to represent complicated logic and
which can be frequently used.
For Example :- After having explored the TripPin OData service, Russell finds out that
it has a function called GetInvolvedPeople from which he can find out the involved
people of a specific trip.
13
GET
http://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/Peop
le('russellwhyte')/Trips(0)/Microsoft.OData.SampleService.Models.TripPin.GetInvolved
People()
HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
In Response :
HTTP/1.1 200 OK
Content-Length: 582
Content-Type: application/json; odata.metadata=minimal
OData-Version: 4.0
{
"@odata.context":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/$metadata#People",
"value":[
{
"@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')",
"@odata.etag":"W/"08D285C4BEF5EC5D"",
"@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')
", 14
• "UserName":"russellwhyte",
• "FirstName":"Russell",
• "LastName":"Whyte",
• "Emails":[
• "Russell@example.com",
• "Russell@contoso.com"
• ],
• "AddressInfo":[
• {
• "Address":"187 Suffolk Ln.",
• "City":{
• "CountryRegion":"United States",
• "Name":"Boise",
• "Region":"ID"
• }
• }
• ],
• "Gender":"Male",
• "Concurrency":635717577476533341
• },
• {
• "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')",
• "@odata.etag":"W/"08D285C4BEF5EC5D"",
• "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')",
• "UserName":"scottketchum",
• "FirstName":"Scott",
• "LastName":"Ketchum",
• "Emails":[
• "Scott@example.com"
• ],
• "AddressInfo":[
• {
• "Address":"2817 Milton Dr.",
• "City":{
• "CountryRegion":"United States",
• "Name":"Albuquerque",
• "Region":"NM"
• }
• }
• ],
• "Gender":"Male",
• "Concurrency":635717577476533341
• }
• ] }
15
16

More Related Content

What's hot

Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]Olivier Travers
 
Power BI: From the Basics
Power BI: From the BasicsPower BI: From the Basics
Power BI: From the BasicsNikkia Carter
 
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Edureka!
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUDPrem Sanil
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practicesAnkita Mahajan
 
Introduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsIntroduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsLuc Vanrobays
 
Solace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi PresentationSolace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi PresentationSolace
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Azure Data Factory v2
Azure Data Factory v2Azure Data Factory v2
Azure Data Factory v2inovex GmbH
 
Power BI Overview
Power BI OverviewPower BI Overview
Power BI OverviewJames Serra
 
Azure Data Factory presentation with links
Azure Data Factory presentation with linksAzure Data Factory presentation with links
Azure Data Factory presentation with linksChris Testa-O'Neill
 
PL-900 Microsoft Power Platform Fundamentals
PL-900 Microsoft Power Platform FundamentalsPL-900 Microsoft Power Platform Fundamentals
PL-900 Microsoft Power Platform FundamentalsNanddeep Nachan
 
SAP Cloud Platform Integration L2 Deck 2017Q4
SAP Cloud Platform Integration L2 Deck 2017Q4SAP Cloud Platform Integration L2 Deck 2017Q4
SAP Cloud Platform Integration L2 Deck 2017Q4SAP Cloud Platform
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoDimko Zhluktenko
 

What's hot (20)

Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
 
SAP BW Introduction.
SAP BW Introduction.SAP BW Introduction.
SAP BW Introduction.
 
Power BI: From the Basics
Power BI: From the BasicsPower BI: From the Basics
Power BI: From the Basics
 
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practices
 
Introduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds viewsIntroduction to extracting data from sap s 4 hana with abap cds views
Introduction to extracting data from sap s 4 hana with abap cds views
 
Solace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi PresentationSolace Singapore User Group: Dell Boomi Presentation
Solace Singapore User Group: Dell Boomi Presentation
 
Web api
Web apiWeb api
Web api
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
NetWeaver Gateway- Introduction to OData
NetWeaver Gateway- Introduction to ODataNetWeaver Gateway- Introduction to OData
NetWeaver Gateway- Introduction to OData
 
Sap Analytics Cloud
Sap Analytics CloudSap Analytics Cloud
Sap Analytics Cloud
 
Azure Data Factory v2
Azure Data Factory v2Azure Data Factory v2
Azure Data Factory v2
 
Power BI Overview
Power BI OverviewPower BI Overview
Power BI Overview
 
API Basics
API BasicsAPI Basics
API Basics
 
Azure Data Factory presentation with links
Azure Data Factory presentation with linksAzure Data Factory presentation with links
Azure Data Factory presentation with links
 
PL-900 Microsoft Power Platform Fundamentals
PL-900 Microsoft Power Platform FundamentalsPL-900 Microsoft Power Platform Fundamentals
PL-900 Microsoft Power Platform Fundamentals
 
SAP Cloud Platform Integration L2 Deck 2017Q4
SAP Cloud Platform Integration L2 Deck 2017Q4SAP Cloud Platform Integration L2 Deck 2017Q4
SAP Cloud Platform Integration L2 Deck 2017Q4
 
Azure Data Factory v2
Azure Data Factory v2Azure Data Factory v2
Azure Data Factory v2
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene PolonichkoAzure DataBricks for Data Engineering by Eugene Polonichko
Azure DataBricks for Data Engineering by Eugene Polonichko
 

Viewers also liked

OData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionOData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionEugenio Lentini
 
Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataChris Whealy
 
Odata introduction-slides
Odata introduction-slidesOdata introduction-slides
Odata introduction-slidesMasterCode.vn
 
OData and the future of business objects universes
OData and the future of business objects universesOData and the future of business objects universes
OData and the future of business objects universesSumit Sarkar
 
OData Hackathon Challenge
OData Hackathon ChallengeOData Hackathon Challenge
OData Hackathon ChallengeSumit Sarkar
 
RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7
RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7
RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7CA API Management
 
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...CA API Management
 
The Architecture of an API Platform
The Architecture of an API PlatformThe Architecture of an API Platform
The Architecture of an API PlatformJohannes Ridderstedt
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...CA API Management
 
Api architectures for the modern enterprise
Api architectures for the modern enterpriseApi architectures for the modern enterprise
Api architectures for the modern enterpriseCA API Management
 

Viewers also liked (12)

OData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionOData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introduction
 
A Look at OData
A Look at ODataA Look at OData
A Look at OData
 
Practical OData
Practical ODataPractical OData
Practical OData
 
Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and OData
 
Odata introduction-slides
Odata introduction-slidesOdata introduction-slides
Odata introduction-slides
 
OData and the future of business objects universes
OData and the future of business objects universesOData and the future of business objects universes
OData and the future of business objects universes
 
OData Hackathon Challenge
OData Hackathon ChallengeOData Hackathon Challenge
OData Hackathon Challenge
 
RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7
RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7
RESTful Web APIs – Mike Amundsen, Principal API Architect, Layer 7
 
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
API360 – A How-To Guide for Enterprise APIs - Learn how to position your ente...
 
The Architecture of an API Platform
The Architecture of an API PlatformThe Architecture of an API Platform
The Architecture of an API Platform
 
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
API Design Methodology - Mike Amundsen, Director of API Architecture, API Aca...
 
Api architectures for the modern enterprise
Api architectures for the modern enterpriseApi architectures for the modern enterprise
Api architectures for the modern enterprise
 

Similar to Odata

OData Across Boundaries
OData Across BoundariesOData Across Boundaries
OData Across BoundariesSam Basu
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIGert Drapers
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePointSanjay Patel
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataPace Integration
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Learning W3C Linked Data Platform with examples
Learning W3C Linked Data Platform with examplesLearning W3C Linked Data Platform with examples
Learning W3C Linked Data Platform with examplesNandana Mihindukulasooriya
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes WorkshopErik Hatcher
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service BIOVIA
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...Crossref
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developersGlen Gordon
 
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...FIWARE
 
Web-01-HTTP.pptx
Web-01-HTTP.pptxWeb-01-HTTP.pptx
Web-01-HTTP.pptxAliZaib71
 
CrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef WorkshopsCrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef WorkshopsCrossref
 
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
DC-2008 Tutorial 3 - Dublin Core and other metadata schemasDC-2008 Tutorial 3 - Dublin Core and other metadata schemas
DC-2008 Tutorial 3 - Dublin Core and other metadata schemasMikael Nilsson
 

Similar to Odata (20)

OData Across Boundaries
OData Across BoundariesOData Across Boundaries
OData Across Boundaries
 
Introduction to o data
Introduction to o dataIntroduction to o data
Introduction to o data
 
OData – Super Cola W3
OData – Super Cola W3OData – Super Cola W3
OData – Super Cola W3
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPI
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
Breaking down data silos with OData
Breaking down data silos with ODataBreaking down data silos with OData
Breaking down data silos with OData
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and OData
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Learning W3C Linked Data Platform with examples
Learning W3C Linked Data Platform with examplesLearning W3C Linked Data Platform with examples
Learning W3C Linked Data Platform with examples
 
Solr Recipes Workshop
Solr Recipes WorkshopSolr Recipes Workshop
Solr Recipes Workshop
 
(ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service (ATS6-PLAT04) Query service
(ATS6-PLAT04) Query service
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
 
Introduction to W3C Linked Data Platform
Introduction to W3C Linked Data PlatformIntroduction to W3C Linked Data Platform
Introduction to W3C Linked Data Platform
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
FIWARE Global Summit - The Way Towards Interoperability between Web Of Things...
 
Web-01-HTTP.pptx
Web-01-HTTP.pptxWeb-01-HTTP.pptx
Web-01-HTTP.pptx
 
CrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef WorkshopsCrossRef Technical Basics 2010 CrossRef Workshops
CrossRef Technical Basics 2010 CrossRef Workshops
 
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
DC-2008 Tutorial 3 - Dublin Core and other metadata schemasDC-2008 Tutorial 3 - Dublin Core and other metadata schemas
DC-2008 Tutorial 3 - Dublin Core and other metadata schemas
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Odata

  • 2. What is OData • Open Data Protocol (OData) is an open protocol for sharing data. • It is built upon AtomPub, itself an extension of Atom Publishing Protocol. [The Atom Publishing Protocol (AtomPub) is an Application level protocol for publishing and editing web resources.] • OData is based on REST (Representational State Transfer) ; therefore a simple web browser can view the data exposed through an OData service. • The basic idea behind OData is to use a well known data format (Atom feed) to expose a list of entities. • AtomPub extends the basic Atom Protocol by allowing not only read but the whole set of CRUD operations. 2
  • 3. • Atom is an XML-based document format that describes Collections of related • information known as "feeds". Feeds are composed of a number of items, known as Entries. 3
  • 4. How OData Works: Technology Basics 4 • The OData technology has four main parts: 1. OData data model 2. OData protocol 3. OData client libraries 4. OData service
  • 5. 1. The OData data model, which provides a generic way to organize and describe data. 2. The OData protocol, which lets a client make requests to and get responses from an OData service. Those interactions include the usual create/read/update/delete (CRUD) operations, along with an OData- defined query language. 3. OData client libraries, which make it easier to create software that accesses data via the OData protocol. Because OData relies on REST, using an OData-specific client library isn't strictly required. But most OData clients are applications, and so providing pre-built libraries for making OData requests and getting results makes life simpler for the developers who create those applications. 4. An OData service, which exposes an endpoint that allows access to data. This service implements the OData protocol, and it also uses the abstractions of the OData data model to translate data between its underlying form, which might be relational tables, SharePoint lists, or something else, into the format sent to the client. 5
  • 6. Consumption of Odata Example 1. Requesting resources : Foe example here we use the service of an open trip management system . If a person named Russell White, who has formerly registered TripPin, would like to find out who are the other people in it. GET http://services.odata.org/v4/TripPinServiceRW/People HTTP/1.1 OData-Version: 4.0 OData-MaxVersion: 4.0 This uses version 4 TripPin from where it fetch data List of people whose data are retrieved HTTP Version 1.1 6
  • 7. In Response • HTTP/1.1 200 OK • Content-Length: 1007 • Content-Type: application/json; odata.metadata=minimal Service Route URL Resource path • OData-Version: 4.0 • { • "@odata.context":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/$metadata#People", • "@odata.nextLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People?%24skiptoken=8", • "value":[ • { • "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')", • "@odata.etag":"W/"08D285C0E2748213"", • "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')", • "UserName":"russellwhyte", • "FirstName":"Russell", • "LastName":"Whyte", • "Emails":[ • "Russell@example.com", • "Russell@contoso.com" • ], • "AddressInfo":[ • { • "Address":"187 Suffolk Ln.", • "City":{ • "CountryRegion":"United States", • "Name":"Boise", • "Region":"ID" • } • } • ], • "Gender":"Male", • "Concurrency":635717560892162579 • }, • { • ...................................... • } • ]} 7
  • 8. 2. Requesting an individual resource GET http://services.odata.org/v4/TripPinServiceRW/People('russellwhyte') HTTP/1.1 OData-Version: 4.0 User name of the individual OData-MaxVersion: 4.0 Resource 3. Queries GET http://services.odata.org/v4/TripPinServiceRW/People?$top=2 & $select=FirstName, LastName & $filter=Trips/any(d:d/Budget gt 3000) HTTP/1.1 OData-Version: 4.0 OData-MaxVersion: 4.0 8
  • 9. In Response • HTTP/1.1 200 OK • Content-Length: 367 • Content-Type: application/json; odata.metadata=minimal • OData-Version: 4.0 • { • "@odata.context":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/$metadata#People(FirstNam e,LastName)", • "value":[ • { • "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')", • "@odata.etag":"W/"08D285C0E2748213"", • "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')", • "FirstName":"Scott", • "LastName":"Ketchum" • }, • { • "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('ronaldmundy')", • "@odata.etag":"W/"08D285C0E2748213"", • "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('ronaldmundy')", • "FirstName":"Ronald", • "LastName":"Mundy" • } • ] • } 9
  • 10. 4. Creating a new resource POST http://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/People HTTP/1.1 OData-Version: 4.0 OData-MaxVersion: 4.0 Content-Length: 428 Content-Type: application/json { "UserName":"lewisblack", "FirstName":"Lewis", "LastName":"Black", "Emails":[ "lewisblack@example.com" ], "AddressInfo":[ { "Address":"187 Suffolk Ln.", "City":{ "CountryRegion":"United States", "Name":"Boise", "Region":"ID" } } ], "Gender":"Male", "Concurrency":635519729375200400 } 10
  • 11. In Response HTTP/1.1 201 Created Content-Length: 652 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=f alse;charset=utf-8 ETag: W/'08D1D3800FC572E3' Location: http://services.odata.org/V4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/Peop le('lewisblack') OData-Version: 4.0 NOTE :- IEEE754Compatible=false ;= means that Int64(Represents a 64-bit signed integer.) and Decimal are serialized as numbers. 11
  • 12. 5. Relating resources In RESTful APIs, resources are usually dependent with each other. For that, the concept of relationships in OData can be defined among resources to add flexibility and richness to the data model. Example - POST http://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/Peop le('lewisblack')/Trips/$ref HTTP/1.1 OData-Version: 4.0 OData-MaxVersion: 4.0 Content-Length: 123 Content-Type: application/json { "@odata.id":"http://services.odata.org/V4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinSer viceRW/People('russellwhyte')/Trips(0)" } 12
  • 13. In Response HTTP/1.1 204 No Content OData-Version: 4.0 6. Invoking a Function OData supports defining functions and actions to represent complicated logic and which can be frequently used. For Example :- After having explored the TripPin OData service, Russell finds out that it has a function called GetInvolvedPeople from which he can find out the involved people of a specific trip. 13
  • 14. GET http://services.odata.org/v4/(S(34wtn2c0hkuk5ekg0pjr513b))/TripPinServiceRW/Peop le('russellwhyte')/Trips(0)/Microsoft.OData.SampleService.Models.TripPin.GetInvolved People() HTTP/1.1 OData-Version: 4.0 OData-MaxVersion: 4.0 In Response : HTTP/1.1 200 OK Content-Length: 582 Content-Type: application/json; odata.metadata=minimal OData-Version: 4.0 { "@odata.context":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/$metadata#People", "value":[ { "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte')", "@odata.etag":"W/"08D285C4BEF5EC5D"", "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('russellwhyte') ", 14
  • 15. • "UserName":"russellwhyte", • "FirstName":"Russell", • "LastName":"Whyte", • "Emails":[ • "Russell@example.com", • "Russell@contoso.com" • ], • "AddressInfo":[ • { • "Address":"187 Suffolk Ln.", • "City":{ • "CountryRegion":"United States", • "Name":"Boise", • "Region":"ID" • } • } • ], • "Gender":"Male", • "Concurrency":635717577476533341 • }, • { • "@odata.id":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')", • "@odata.etag":"W/"08D285C4BEF5EC5D"", • "@odata.editLink":"http://services.odata.org/V4/(S(fo3by51qwd1q124ngi2rxrzc))/TripPinServiceRW/People('scottketchum')", • "UserName":"scottketchum", • "FirstName":"Scott", • "LastName":"Ketchum", • "Emails":[ • "Scott@example.com" • ], • "AddressInfo":[ • { • "Address":"2817 Milton Dr.", • "City":{ • "CountryRegion":"United States", • "Name":"Albuquerque", • "Region":"NM" • } • } • ], • "Gender":"Male", • "Concurrency":635717577476533341 • } • ] } 15
  • 16. 16

Editor's Notes

  1. Atom is an XML-based document format that describes Collections of related information known as "feeds". Feeds are composed of a number of items, known as Entries. 
  2. The OData data model, which provides a generic way to organize and describe data. The OData protocol, which lets a client make requests to and get responses from an OData service. Those interactions include the usual create/read/update/delete (CRUD) operations, along with an OData-defined query language.  OData client libraries, which make it easier to create software that accesses data via the OData protocol. Because OData relies on REST, using an OData-specific client library isn't strictly required. But most OData clients are applications, and so providing pre-built libraries for making OData requests and getting results makes life simpler for the developers who create those applications. An OData service, which exposes an endpoint that allows access to data. This service implements the OData protocol, and it also uses the abstractions of the OData data model to translate data between its underlying form, which might be relational tables, SharePoint lists, or something else, into the format sent to the client.
  3. IEEE754Compatible=false ;= means that Int64(Represents a 64-bit signed integer.) and Decimal are serialized as numbers.