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

Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Stephan Klevenz
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js ExpressEyal Vardi
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentationivpol
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Core Data Service
Core Data ServiceCore Data Service
Core Data ServiceSujoy Saha
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding RESTNitin Pande
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object ModelWebStackAcademy
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap1amitgupta
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Vibhawa Nirmal
 
REST-API overview / concepts
REST-API overview / conceptsREST-API overview / concepts
REST-API overview / conceptsPatrick Savalle
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 

What's hot (20)

REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014Apache Olingo - ApacheCon Denver 2014
Apache Olingo - ApacheCon Denver 2014
 
Rest API
Rest APIRest API
Rest API
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Node.js Express
Node.js  ExpressNode.js  Express
Node.js Express
 
ASP.NET MVC Presentation
ASP.NET MVC PresentationASP.NET MVC Presentation
ASP.NET MVC Presentation
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Core Data Service
Core Data ServiceCore Data Service
Core Data Service
 
Understanding REST
Understanding RESTUnderstanding REST
Understanding REST
 
Webservices
WebservicesWebservices
Webservices
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap
 
Servlet
Servlet Servlet
Servlet
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
REST-API overview / concepts
REST-API overview / conceptsREST-API overview / concepts
REST-API overview / concepts
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 

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 (13)

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
 
NetWeaver Gateway- Introduction to OData
NetWeaver Gateway- Introduction to ODataNetWeaver Gateway- Introduction to OData
NetWeaver Gateway- Introduction to OData
 
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

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 

Recently uploaded (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
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
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 

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.