APIs and Linked Data: A match made in Heaven
-
Upload
michael-petychakis -
Category
Technology
-
view
1.199 -
download
0
Transcript of APIs and Linked Data: A match made in Heaven
![Page 1: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/1.jpg)
APIS AND LINKED DATA
A M ATC H M A D E I N H E AV E N
M I C H A E L P E T YC H A K I SN A T I O N A L T E C H N I C A L U N I V E R S I T Y O F A T H E N S
A T H E N S , G R E E C E , 7 T H N O V E M B E R 2 0 1 5
![Page 2: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/2.jpg)
AGENDA
• Linked Data Overview• Business Models on Linked Data• What is an API?• Business Importance Around APIs• APIs and Linked Data• JSON-LD• Hydra• DeepGraphs• Linda
@mpetyx
![Page 3: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/3.jpg)
LINKED DATA
“The term Linked Data refers to a set of best practices for publishing and connecting structured data on the Web.”
“the Semantic Web is the goal or end result… Linked Data provides the means to reach that goal”
From ‘Linked Data: The Story So Far’ - Heath, Bizer and Berners-Lee 2009
“The goal of Linked Data is to enable people to share structured data on the Web as easily as they can share documents today.”• Bizer/Cyganiak/Heath Linked Data Tutorial, linkeddata.org
@mpetyx
![Page 5: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/5.jpg)
URIS AND HTTP
• “A Uniform Resource Identifier’ (URI) provides a simple and extensible means for identifying a resource” – W3C RFC 3986
• HTTP URIs may be ‘de-referenced’on the Web• HTTP URIs are used for “real world” things
• http://adrianstevenson.com/id/me
• http://dbpedia.org/resource/Love
@mpetyx
![Page 6: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/6.jpg)
LINKED DATA BUSINESS MODELS
SubscriptionSell access to data feedsSell access to data driven applications
Advertising
Sell paid placement inside data
feedsSell advertising
around data-driven
applications
AuthoringCharge for
official reviews and
certificationsCharge for data
verifications and
compliance services
Affiliate Links
E-commerce affiliate links embedded in
data feedsE-commerce
affiliate links in data-driven applications
Value-AddData enhances
paid application or
serviceData provided as a customer
or lead incentive
TrafficSearch engine optimisation
Traffic generation via
linked open data networks
BrandingData sets,
structures and ontologies to shape marketData-driven
applications for brand
positioning
Direct Indirect@mpetyx
![Page 7: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/7.jpg)
WHAT IS AN API?
• ‘Application Programming Interface’– “API is an online interface that allows distributed systems to communicate with
one another and exchange information”
– “APIs are carefully thought out pieces of code created by programmers .. that allow other applications to interact with their application”
@mpetyx
![Page 8: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/8.jpg)
APIS
• Allow machine readability of data– Typically over the Web
• Provide other systems with access to content or functions• Many types – e.g.
– Google, Facebook, Flickr, twitter APIs ….– OAI-PMH– Linked Data API, SPARQL– Others include SOLR, SRU, Z39.50, SOAP, ….
@mpetyx
![Page 9: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/9.jpg)
APIS ARE MACHINE TO MACHINE• API is software-to-software interface, not a user
interface• E.g. Cinema ticket websites use API:
– Sends credit card info to remote application– Remote application sends response back to ticket website
saying OK to issue the tickets • User see one interface@mpetyx
![Page 10: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/10.jpg)
@mpetyx
![Page 11: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/11.jpg)
958 million websites
60 trillion web pages@mpetyx
![Page 12: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/12.jpg)
WHY NEED AN API AT ALL?A small
team/Company
Shipping is Priority
API Saves Money
Someone else is doing it better
No Time
@mpetyx
![Page 13: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/13.jpg)
IMPORTANT OF API STABILITY IN SMES
Markeplaces, Hubs,
Directories, Search
Sandboxing
environments
Ad-hoc requests
Testing@mpetyx
![Page 14: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/14.jpg)
EACH API IS UNIQUE
@mpetyx
![Page 15: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/15.jpg)
OPEN APIS
![Page 16: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/16.jpg)
AUTOMATED API PROVISIONING • Problem: How do I use an API without specifically
coding for it? • Answer: Use vocabulary to define operations on
classes and properties • Proposition: Annotations are the result of operations on
entities or the relationships between entities. – Those results are also entities, which may be operated upon.
@mpetyx
![Page 17: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/17.jpg)
LINKS AND OPERATIONS
• Define operations on entities, types of entities, or their properties. • When does a property link to an entity? • How do you use pagination to reference and collect linked entities? • What operations can I perform on an entity, or property of that
entity? • Where does authentication/authorization intersect with generic API
interactions?
@mpetyx
![Page 18: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/18.jpg)
INTRODUCING JSON-LD
JSON-based syntax to express linked data
@context@id
@type
@value@language
@graph
@list@set@mpetyx
![Page 19: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/19.jpg)
SELF-DESCRIBING MESSAGES
• Give objects types (@type)
{ "@context": { "schema": "http://schema.org/", "Person": "schema:Person", "colleagues": {"@id": "schema:colleagues", "@type": "@id"}, "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, "url": {"@id": "schema:url", "@type": "@id"} }}{ "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "colleagues": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com"}@mpetyx
![Page 20: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/20.jpg)
SELF-DESCRIBING MESSAGES
• Give objects types (@type)
• Associate properties with IRIs
{ "@context": { "schema": "http://schema.org/", "Person": "schema:Person", "colleagues": {"@id": "schema:colleagues", "@type": "@id"}, "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, "url": {"@id": "schema:url", "@type": "@id"} }}{ "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "colleagues": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com"}@mpetyx
![Page 21: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/21.jpg)
SELF-DESCRIBING MESSAGES
• Give objects types (@type)
• Associate properties with IRIs
• Use terms defined in a referenced context
{ "@context": { "schema": "http://schema.org/", "Person": "schema:Person", "colleagues": {"@id": "schema:colleagues", "@type": "@id"}, "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, "url": {"@id": "schema:url", "@type": "@id"} }}{ "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "colleagues": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com"}@mpetyx
![Page 22: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/22.jpg)
SELF-DESCRIBING MESSAGES
• Give objects types (@type)
• Associate properties with IRIs
• Use terms defined in a referenced context
• Specify property types in context
{ "@context": { "schema": "http://schema.org/", "Person": "schema:Person", "colleagues": {"@id": "schema:colleagues", "@type": "@id"}, "name": "schema:name", "image": {"@id": "schema:image", "@type": "@id"}, "url": {"@id": "schema:url", "@type": "@id"} }}{ "@context": "http://example.com/context.jsonld", "@type": "Person", "image": "http://localhost:9393/examples/schema.org/janedoe.jpg", "knows": [ "http://www.xyz.edu/students/alicejones.html", "http://www.xyz.edu/students/bobsmith.html" ], "name": "Jane Doe", "url": "http://www.janedoe.com"}@mpetyx
![Page 23: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/23.jpg)
DESCRIBING APIS WITH JSON-LDIn search for the API Nirvana
DeepGraphs
![Page 24: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/24.jpg)
WHAT IS HYDRA?
• W3C Community Group for Linked APIs –REST + Linked Data –“At the intersection of web schemas and RESTful
web applications”
@mpetyx
![Page 25: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/25.jpg)
DEEPGRAPHS APPROACHGoal: Modelling Hypermedia Responses
Hydra Documents SWRL Rules JSON-LD Responses
1 Vocabulary
@mpetyx
![Page 26: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/26.jpg)
SIMILAR APPROACHES/ MEDIA TYPES
DeepGraphs
MasonUber
JSON-LD
JSON API
SirenHAL
Collection JSON
JSON Schema
JSON Hyper
Schema
XML Schema
@mpetyx
![Page 27: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/27.jpg)
THE LINDA SOLUTION
•Usage and Publication of Linked Data•Renovation and Conversion of existing data formats into Structures that support the semantic enrichment and interlinking of data
http://linda-project.eu/@mpetyx
![Page 28: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/28.jpg)
JOIN THE HACK
http://linda-project.eu/hackathon/
http://linda-project.eu/@mpetyx
![Page 29: APIs and Linked Data: A match made in Heaven](https://reader034.fdocuments.net/reader034/viewer/2022042906/58aa58d41a28ab10578b64dd/html5/thumbnails/29.jpg)
THANK YOUMichael Petychakis
<a href="mailto:[email protected]?Subject=Hello" target="_top">Drop me an e-mail</a>
@mpetyx