16
Linked Data APIs May 2015

Linked Data APIs (Funding Circle May 2015)

Embed Size (px)

Citation preview

Page 1: Linked Data APIs (Funding Circle May 2015)

Linked Data APIs

May 2015

Page 2: Linked Data APIs (Funding Circle May 2015)

Linked Open Data in 1 slide

1. URIs2. Uniform access3. Uniform representation4. Links

Page 3: Linked Data APIs (Funding Circle May 2015)

Web of linked documents

1. URLs2. HTTP GET/POST3. HTML (DOM tree)4. href

Page 4: Linked Data APIs (Funding Circle May 2015)

Web of linked data

1. Use URIs to name things2. Make URIs accessible through HTTP with

standard uniform semantics (REST)3. Use standard uniform representations for the

exposed things (RDF)4. Link representations

Page 5: Linked Data APIs (Funding Circle May 2015)

A note on RDF

Uniform and general data model

Carlos

33 31

Jillhttp://mexicans.mx/Carlos#me

http://britons.co.uk/Jill#me

foaf:friendOf

foaf:age

foaf:age

foaf:name

foaf:name

Page 6: Linked Data APIs (Funding Circle May 2015)

A note on RDF

Abstract graph, concrete triples

http://mexicans.mx/Carlos#me foaf:age (33 xsd:int)http://mexicans.mx/Carlos#me foaf:name (‘Carlos’ xsd:string)http://mexicans.mx/Carlos#me foaf:friendOf http://britons.co.uk/Jill#me

http://britons.co.uk/Jill#me foaf:age (31 xsd:int)http://britons.co.uk/Jill#me foaf:name (‘Jill’ xsd:String)http://britons.co.uk/Jill#me foaf:friendOf http://mexicans.mx/Carlos#me

Page 7: Linked Data APIs (Funding Circle May 2015)

A note on RDFGET http://mexicans.mx/Carlos#meAccept: application/json+ld

GET http://mexicans.mx/CarlosAccept: application/json+ld

{ "@id": "http://mexicans.mx/Carlos#me", "name": "Carlos", "age": 33, "knows": "http://britons.co.uk/Jill#me", "@context": {

"@vocab": "http://xmlns.com/foaf/0.1/", "friendOf": {"@type":"@id"}

}}

http://mexicans.mx/Carlos#me foaf:age (33 xsd:int)http://mexicans.mx/Carlos#me foaf:name (‘Carlos’ xsd:string)http://mexicans.mx/Carlos#me foaf:friendOf http://britons.co.uk/Jill#me

Carlos

33

http://mexicans.mx/Carlos#me

foaf:friendOf

foaf:age

foaf:name

http://britons.co.uk/Jill#me

Page 8: Linked Data APIs (Funding Circle May 2015)

A note on RDFGET http://britons.co.uk/Jill#meAccept: text/n3

GET http://britons.co.uk/JillAccept: text/n3

<http://britons.co.uk/Jill#me> <foaf:name> “Jill” ; <foaf:age> 35^^<xsd:int> ; <foaf:friendOf> <http://mexicans.mx/Carlos#me> .

http://britons.co.uk/Jill#me foaf:age (31 xsd:int)http://britons.co.uk/Jill#me foaf:name (‘Jill’ xsd:String)http://britons.co.uk/Jill#me foaf:friendOf http://mexicans.mx/Carlos#me Carlo

s

33 31

http://mexicans.mx/Carlos#me

http://britons.co.uk/Jill#me

foaf:friendOf

foaf:agefoaf:age

foaf:name

foaf:name Jill

Page 9: Linked Data APIs (Funding Circle May 2015)

LD API architecture

ABox / Data (RDF)

TBox / Schema (OWL,FOAF,FIBO)

Relational DB

Triple Store

Physical Mapping (R2RML)

Conceptual RDF graph

Linked Resource

Graph partition

HTTPS

CRUD Semantics / SPARQL

REST Semantics / Linked Data Platform (LDP)

Representation

JSON-LD, N3, Turtle, RDF/XML

URL

Legacy API

Authentication / WebID

(W3C Recommendations)

Page 10: Linked Data APIs (Funding Circle May 2015)

API design advice

● Use URIs, not db ids, UUIDs...● Design a data model, not end-points● Re-use vocabularies / ontologies● Link entities, don’t embed them● Data needs a schema / meta-data● Representation is different from data model

Page 11: Linked Data APIs (Funding Circle May 2015)

Demohttps://github.com/antoniogarrote/geektalk

Page 12: Linked Data APIs (Funding Circle May 2015)

Github

JSON-LD Macro

RDFStore-js

Stack OverflowTwitter

JSON-LD

DOM Nodes

RDF Graph / DOM Tree declarative bindings (SemKO+SPARQL)

Page 13: Linked Data APIs (Funding Circle May 2015)
Page 14: Linked Data APIs (Funding Circle May 2015)
Page 15: Linked Data APIs (Funding Circle May 2015)
Page 16: Linked Data APIs (Funding Circle May 2015)