SlideShare a Scribd company logo
1 of 21
Information Sciences Institute
OBA: An Ontology-Based Framework for
Creating REST APIs for Knowledge Graphs
Daniel Garijo and Maximiliano Osorio
{dgarijo,mosorio}@isi.edu
@dgarijov, @SirSpock
Information Sciences Institute
Exploring a SPARQL endpoint
LOV
https://lists.w3.org/Archives/Public/semantic-web/2015Jan/0087.html
W3C Semantic Web lists (2015)
Get all classes
Get
documentation
and examples
Get all classes
and
properties
Luca Matteis
Thomas Francart
Jerven Bolleman
Information Sciences Institute
Requirements for KG consumption
LOV
https://lod-cloud.net/#diagram
SPARQL endpoint
Ontology/vocabulary
Documentation/
examples
Developer
Information Sciences Institute
The gap between KG engineers and
consumers
Ontology/KG engineer
- Familiar with
ontologies/vocabularies used to
represent data
- Exposes data in SPARQL
endpoint/RDF dump
- Knows SPARQL queries
Web developer
- Unfamiliar with
ontologies/vocabularies used
- Uses JSON to read and
manipulate data
- Uses REST APIs to retrieve
data
Information Sciences Institute
OBA: Ontology Based APIs
OWL
Ontology
SPARQL
endpoint
OpenAPI
Specification
(OAS)
REST API
Server
Information Sciences Institute
OBA: Ontology Based APIs
OWL
Ontology
SPARQL
endpoint
OpenAPI
Specification
(OAS)
REST API
Server
OWL to OAS
Mapping
Generate and
test server
Automated
JSON to
RDF
handling
Generate
clients
Information Sciences Institute
OBA: Ontology Based APIs
OWL
Ontology
SPARQL
endpoint
OpenAPI
Specification
(OAS)
REST API
Server
OWL to OAS
Mapping
Generate and
test server
Automated
JSON to
RDF
handling
Generate
clients
Information Sciences Institute
Mapping OWL to OAS
OpenAPI specification (https://swagger.io/specification/)
• Each class maps to an OAS “schema”
– Mapping covers classes, subclasses, properties, data properties,
domain, ranges, and some OWL constraints*
– You can filter undesired paths
• Each class has two path for GET:
– /{ClassName}
– /{ClassName}/{instanceID}
• One path for PUT, POST and DELETE:
– /{ClassName} [POST]
– /{ClassName}/{instanceID} [PUT, DELETE]
*More information: https://oba.readthedocs.io/en/latest/mapping/
Information Sciences Institute
Mapping OWL to OAS: Example
Person
Student
Student
Record
subclassOf
hasRecord
:Person rdf:type owl:Class ;
rdfs:label "Person"@en.
:Student rdf:type owl:Class ;
rdfs:subClassOf :Person ;
rdfs:label "Student"@en .
:hasRecord rdf:type owl:ObjectProperty
, owl:FunctionalProperty ;
rdfs:domain :Student ;
rdfs:range :StudentRecord ;
rdfs:label "has record"@en .
components:
schemas:
Person:
type: object
properties:
name:
type: string
Student:
allOf:
- $ref: '#/components/schemas/Person'
- type: object
properties:
hasRecord:
items:
$ref: '#/components/schemas/StudentRecord
type: array
maxItems: 1
OWL (ttl) OAS (yaml)
Information Sciences Institute
OBA: Ontology Based APIs
OWL
Ontology
SPARQL
endpoint
OpenAPI
Specification
(OAS)
REST API
Server
OWL to OAS
Mapping
Generate and
test server
Automated
JSON to
RDF
handling
Generate
clients
Information Sciences Institute
Generating the server: Workflow
OpenAPITools / openapi-generator
stain / owl2jsonld
Information Sciences Institute
OBA: Ontology Based APIs
OWL
Ontology
SPARQL
endpoint
OpenAPI
Specification
(OAS)
REST API
Server
OWL to OAS
Mapping
Generate and
test server
Automated
JSON to
RDF
handling
Generate
clients
Information Sciences Institute
From RDF to JSON
https://w3c.github.io/json-ld-framing/
Information Sciences Institute
Custom Queries
Additional queries may be required in the API
1. Create a new query
– CONSTRUCT
1. Define query parameters
– Basil’s convention
1. Add path to OAS
Basil
custom_paths:
/custom/models/variable:
get:
description: Get models by variable name
parameters:
- description: Name of the custom query
in: query
name: custom_query_name
required: false
schema:
default: custom_models_variable
type: string
- description: variable to search
in: query
name: label
required: true
schema:
type: string
responses:
200:
content:
application/json:
...
Information Sciences Institute
OBA: Ontology Based APIs
OWL
Ontology
SPARQL
endpoint
OpenAPI
Specification
(OAS)
REST API
Server
OWL to OAS
Mapping
Generate and
test server
Automated
JSON to
RDF
handling
Generate
clients
Information Sciences Institute
Generating your own client
Example: https://model-catalog-python-api-client.readthedocs.io/en/latest/models/
...
Information Sciences Institute
Performance
150 ms (max) of delay
60 req/sec (With reverse proxy
caching enabled)
Information Sciences Institute
Conclusions and Future Work
Using SPARQL endpoints as a non Semantic Web expert is
challenging
- Need to know SPARQL
- Need to understand the ontologies used to represent the data
- Need to understand documentation and examples
OBA enables KG engineers to easily expose REST APIs from
their ontologies/vocabularies:
- Create an OAS specification from an ontology
- Generate a REST server that accepts and returns JSON following the OAS
- Generate tests
Next for OBA: JSON-LD, GraphQL support, advanced SHACL validation
Information Sciences Institute
Help us improve OBA
Documentation:
https://oba.readthedocs.io/en/latest/
GitHub:
https://github.com/KnowledgeCaptureAndDiscovery/OBA/
Examples:
https://oba.readthedocs.io/en/latest/examples/
OWL
SPARQL
JSON-LD
OpenAPI +
documentation
REST
JSON
Information Sciences Institute
Acknowledgements
Yolanda Gil
Hernan Vargas
Oscar Corcho
Paola Espinoza
Carlos Badenes
Karl Hammar
Anonymous ISWC reviewers
This work was funded by the Defense Advanced Research Projects Agency with award
W911NF-18-1-0027 and the National Science Foundation with award ICER-144032
Information Sciences Institute
OBA: An Ontology-Based Framework for
Creating REST APIs for Knowledge Graphs
Daniel Garijo and Maximiliano Osorio
dgarijo@isi.edu
@dgarijov

More Related Content

What's hot

2 ways to get total sum of interactive grid column oracle apex ontoor blogs
2 ways to get total sum of interactive grid column oracle apex   ontoor blogs2 ways to get total sum of interactive grid column oracle apex   ontoor blogs
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
sulimankareem
 
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdfJuanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
FIWARE
 
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE
 
Building a Microservices-based ERP System
Building a Microservices-based ERP SystemBuilding a Microservices-based ERP System
Building a Microservices-based ERP System
MongoDB
 

What's hot (20)

Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion Principle
 
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
2 ways to get total sum of interactive grid column oracle apex   ontoor blogs2 ways to get total sum of interactive grid column oracle apex   ontoor blogs
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
 
FIWARE Global Summit - NGSI-LD - NGSI with Linked Data
FIWARE Global Summit - NGSI-LD - NGSI with Linked DataFIWARE Global Summit - NGSI-LD - NGSI with Linked Data
FIWARE Global Summit - NGSI-LD - NGSI with Linked Data
 
Graph Data Science at Scale
Graph Data Science at ScaleGraph Data Science at Scale
Graph Data Science at Scale
 
DSpace-CRIS technical level introduction
DSpace-CRIS technical level introductionDSpace-CRIS technical level introduction
DSpace-CRIS technical level introduction
 
Serving ML easily with FastAPI
Serving ML easily with FastAPIServing ML easily with FastAPI
Serving ML easily with FastAPI
 
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdfJuanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
Juanjo Hierro - Introduction and overview of FIWARE Vision on Data Spaces.pdf
 
Knowledge Graph Generation from Wikipedia in the Age of ChatGPT: Knowledge ...
Knowledge Graph Generation  from Wikipedia in the Age of ChatGPT:  Knowledge ...Knowledge Graph Generation  from Wikipedia in the Age of ChatGPT:  Knowledge ...
Knowledge Graph Generation from Wikipedia in the Age of ChatGPT: Knowledge ...
 
New Features in OBIEE 12c
New Features in OBIEE 12c New Features in OBIEE 12c
New Features in OBIEE 12c
 
Knowledge graph construction for research & medicine
Knowledge graph construction for research & medicineKnowledge graph construction for research & medicine
Knowledge graph construction for research & medicine
 
Snowflake Best Practices for Elastic Data Warehousing
Snowflake Best Practices for Elastic Data WarehousingSnowflake Best Practices for Elastic Data Warehousing
Snowflake Best Practices for Elastic Data Warehousing
 
Data Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive ApproachesData Privacy with Apache Spark: Defensive and Offensive Approaches
Data Privacy with Apache Spark: Defensive and Offensive Approaches
 
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust Marketplace
 
Design Guidelines for Data Mesh and Decentralized Data Organizations
Design Guidelines for Data Mesh and Decentralized Data OrganizationsDesign Guidelines for Data Mesh and Decentralized Data Organizations
Design Guidelines for Data Mesh and Decentralized Data Organizations
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 
Big Data and ML on Google Cloud
Big Data and ML on Google CloudBig Data and ML on Google Cloud
Big Data and ML on Google Cloud
 
Data Versioning and Reproducible ML with DVC and MLflow
Data Versioning and Reproducible ML with DVC and MLflowData Versioning and Reproducible ML with DVC and MLflow
Data Versioning and Reproducible ML with DVC and MLflow
 
GraphConnect 2022 - Top 10 Cypher Tuning Tips & Tricks.pptx
GraphConnect 2022 - Top 10 Cypher Tuning Tips & Tricks.pptxGraphConnect 2022 - Top 10 Cypher Tuning Tips & Tricks.pptx
GraphConnect 2022 - Top 10 Cypher Tuning Tips & Tricks.pptx
 
Managing Millions of Tests Using Databricks
Managing Millions of Tests Using DatabricksManaging Millions of Tests Using Databricks
Managing Millions of Tests Using Databricks
 
Building a Microservices-based ERP System
Building a Microservices-based ERP SystemBuilding a Microservices-based ERP System
Building a Microservices-based ERP System
 

Similar to OBA: An Ontology-Based Framework for Creating REST APIs for Knowledge Graphs

A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
Marakana Inc.
 
Automatic Query-Centric API for Routine Access to Linked Data
Automatic Query-Centric API for Routine Access to Linked DataAutomatic Query-Centric API for Routine Access to Linked Data
Automatic Query-Centric API for Routine Access to Linked Data
Albert Meroño-Peñuela
 
Sem facet paper
Sem facet paperSem facet paper
Sem facet paper
DBOnto
 

Similar to OBA: An Ontology-Based Framework for Creating REST APIs for Knowledge Graphs (20)

Integrating a Domain Ontology Development Environment and an Ontology Search ...
Integrating a Domain Ontology Development Environment and an Ontology Search ...Integrating a Domain Ontology Development Environment and an Ontology Search ...
Integrating a Domain Ontology Development Environment and an Ontology Search ...
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
 
Crossing the chasm between ontology engineering and application development
Crossing the chasm between ontology engineering and application developmentCrossing the chasm between ontology engineering and application development
Crossing the chasm between ontology engineering and application development
 
Automatic Query-Centric API for Routine Access to Linked Data
Automatic Query-Centric API for Routine Access to Linked DataAutomatic Query-Centric API for Routine Access to Linked Data
Automatic Query-Centric API for Routine Access to Linked Data
 
The Materials API
The Materials APIThe Materials API
The Materials API
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic Web
 
PyOSLC SDK - OSLCFEST
PyOSLC SDK - OSLCFESTPyOSLC SDK - OSLCFEST
PyOSLC SDK - OSLCFEST
 
Metadata is back!
Metadata is back!Metadata is back!
Metadata is back!
 
eureka09
eureka09eureka09
eureka09
 
eureka09
eureka09eureka09
eureka09
 
Ozr2013
Ozr2013Ozr2013
Ozr2013
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns Webinar
 
iServe Version 1
iServe Version 1iServe Version 1
iServe Version 1
 
OAISRB
OAISRBOAISRB
OAISRB
 
Web Spa
Web SpaWeb Spa
Web Spa
 
Picking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use CasePicking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use Case
 
Exploring and using the Semantic Web - SSSW09 tutorial
Exploring and using the Semantic Web - SSSW09 tutorialExploring and using the Semantic Web - SSSW09 tutorial
Exploring and using the Semantic Web - SSSW09 tutorial
 
Sem facet paper
Sem facet paperSem facet paper
Sem facet paper
 
SemFacet paper
SemFacet paperSemFacet paper
SemFacet paper
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
 

More from dgarijo

Towards Knowledge Graphs of Reusable Research Software Metadata
Towards Knowledge Graphs of Reusable Research Software MetadataTowards Knowledge Graphs of Reusable Research Software Metadata
Towards Knowledge Graphs of Reusable Research Software Metadata
dgarijo
 
Capturing Context in Scientific Experiments: Towards Computer-Driven Science
Capturing Context in Scientific Experiments: Towards Computer-Driven ScienceCapturing Context in Scientific Experiments: Towards Computer-Driven Science
Capturing Context in Scientific Experiments: Towards Computer-Driven Science
dgarijo
 
A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...
A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...
A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...
dgarijo
 
Automated Hypothesis Testing with Large Scale Scientific Workflows
Automated Hypothesis Testing with Large Scale Scientific WorkflowsAutomated Hypothesis Testing with Large Scale Scientific Workflows
Automated Hypothesis Testing with Large Scale Scientific Workflows
dgarijo
 
PhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflowsPhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflows
dgarijo
 

More from dgarijo (20)

FOOPS!: An Ontology Pitfall Scanner for the FAIR principles
FOOPS!: An Ontology Pitfall Scanner for the FAIR principlesFOOPS!: An Ontology Pitfall Scanner for the FAIR principles
FOOPS!: An Ontology Pitfall Scanner for the FAIR principles
 
FAIR Workflows: A step closer to the Scientific Paper of the Future
FAIR Workflows: A step closer to the Scientific Paper of the FutureFAIR Workflows: A step closer to the Scientific Paper of the Future
FAIR Workflows: A step closer to the Scientific Paper of the Future
 
Towards Reusable Research Software
Towards Reusable Research SoftwareTowards Reusable Research Software
Towards Reusable Research Software
 
SOMEF: a metadata extraction framework from software documentation
SOMEF: a metadata extraction framework from software documentationSOMEF: a metadata extraction framework from software documentation
SOMEF: a metadata extraction framework from software documentation
 
A Template-Based Approach for Annotating Long-Tailed Datasets
A Template-Based Approach for Annotating Long-Tailed DatasetsA Template-Based Approach for Annotating Long-Tailed Datasets
A Template-Based Approach for Annotating Long-Tailed Datasets
 
Towards Knowledge Graphs of Reusable Research Software Metadata
Towards Knowledge Graphs of Reusable Research Software MetadataTowards Knowledge Graphs of Reusable Research Software Metadata
Towards Knowledge Graphs of Reusable Research Software Metadata
 
Scientific Software Registry Collaboration Workshop: From Software Metadata r...
Scientific Software Registry Collaboration Workshop: From Software Metadata r...Scientific Software Registry Collaboration Workshop: From Software Metadata r...
Scientific Software Registry Collaboration Workshop: From Software Metadata r...
 
WDPlus: Leveraging Wikidata to Link and Extend Tabular Data
WDPlus: Leveraging Wikidata to Link and Extend Tabular DataWDPlus: Leveraging Wikidata to Link and Extend Tabular Data
WDPlus: Leveraging Wikidata to Link and Extend Tabular Data
 
OKG-Soft: An Open Knowledge Graph With Mathine Readable Scientific Software M...
OKG-Soft: An Open Knowledge Graph With Mathine Readable Scientific Software M...OKG-Soft: An Open Knowledge Graph With Mathine Readable Scientific Software M...
OKG-Soft: An Open Knowledge Graph With Mathine Readable Scientific Software M...
 
Towards Human-Guided Machine Learning - IUI 2019
Towards Human-Guided Machine Learning - IUI 2019Towards Human-Guided Machine Learning - IUI 2019
Towards Human-Guided Machine Learning - IUI 2019
 
Capturing Context in Scientific Experiments: Towards Computer-Driven Science
Capturing Context in Scientific Experiments: Towards Computer-Driven ScienceCapturing Context in Scientific Experiments: Towards Computer-Driven Science
Capturing Context in Scientific Experiments: Towards Computer-Driven Science
 
A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...
A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...
A Controlled Crowdsourcing Approach for Practical Ontology Extensions and Met...
 
WIDOCO: A Wizard for Documenting Ontologies
WIDOCO: A Wizard for Documenting OntologiesWIDOCO: A Wizard for Documenting Ontologies
WIDOCO: A Wizard for Documenting Ontologies
 
Towards Automating Data Narratives
Towards Automating Data NarrativesTowards Automating Data Narratives
Towards Automating Data Narratives
 
Automated Hypothesis Testing with Large Scale Scientific Workflows
Automated Hypothesis Testing with Large Scale Scientific WorkflowsAutomated Hypothesis Testing with Large Scale Scientific Workflows
Automated Hypothesis Testing with Large Scale Scientific Workflows
 
OntoSoft: A Distributed Semantic Registry for Scientific Software
OntoSoft: A Distributed Semantic Registry for Scientific SoftwareOntoSoft: A Distributed Semantic Registry for Scientific Software
OntoSoft: A Distributed Semantic Registry for Scientific Software
 
OEG tools for supporting Ontology Engineering
OEG tools for supporting Ontology EngineeringOEG tools for supporting Ontology Engineering
OEG tools for supporting Ontology Engineering
 
Software Metadata: Describing "dark software" in GeoSciences
Software Metadata: Describing "dark software" in GeoSciencesSoftware Metadata: Describing "dark software" in GeoSciences
Software Metadata: Describing "dark software" in GeoSciences
 
Reproducibility Using Semantics: An Overview
Reproducibility Using Semantics: An OverviewReproducibility Using Semantics: An Overview
Reproducibility Using Semantics: An Overview
 
PhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflowsPhD Thesis: Mining abstractions in scientific workflows
PhD Thesis: Mining abstractions in scientific workflows
 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Health
 

Recently uploaded (20)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 

OBA: An Ontology-Based Framework for Creating REST APIs for Knowledge Graphs

  • 1. Information Sciences Institute OBA: An Ontology-Based Framework for Creating REST APIs for Knowledge Graphs Daniel Garijo and Maximiliano Osorio {dgarijo,mosorio}@isi.edu @dgarijov, @SirSpock
  • 2. Information Sciences Institute Exploring a SPARQL endpoint LOV https://lists.w3.org/Archives/Public/semantic-web/2015Jan/0087.html W3C Semantic Web lists (2015) Get all classes Get documentation and examples Get all classes and properties Luca Matteis Thomas Francart Jerven Bolleman
  • 3. Information Sciences Institute Requirements for KG consumption LOV https://lod-cloud.net/#diagram SPARQL endpoint Ontology/vocabulary Documentation/ examples Developer
  • 4. Information Sciences Institute The gap between KG engineers and consumers Ontology/KG engineer - Familiar with ontologies/vocabularies used to represent data - Exposes data in SPARQL endpoint/RDF dump - Knows SPARQL queries Web developer - Unfamiliar with ontologies/vocabularies used - Uses JSON to read and manipulate data - Uses REST APIs to retrieve data
  • 5. Information Sciences Institute OBA: Ontology Based APIs OWL Ontology SPARQL endpoint OpenAPI Specification (OAS) REST API Server
  • 6. Information Sciences Institute OBA: Ontology Based APIs OWL Ontology SPARQL endpoint OpenAPI Specification (OAS) REST API Server OWL to OAS Mapping Generate and test server Automated JSON to RDF handling Generate clients
  • 7. Information Sciences Institute OBA: Ontology Based APIs OWL Ontology SPARQL endpoint OpenAPI Specification (OAS) REST API Server OWL to OAS Mapping Generate and test server Automated JSON to RDF handling Generate clients
  • 8. Information Sciences Institute Mapping OWL to OAS OpenAPI specification (https://swagger.io/specification/) • Each class maps to an OAS “schema” – Mapping covers classes, subclasses, properties, data properties, domain, ranges, and some OWL constraints* – You can filter undesired paths • Each class has two path for GET: – /{ClassName} – /{ClassName}/{instanceID} • One path for PUT, POST and DELETE: – /{ClassName} [POST] – /{ClassName}/{instanceID} [PUT, DELETE] *More information: https://oba.readthedocs.io/en/latest/mapping/
  • 9. Information Sciences Institute Mapping OWL to OAS: Example Person Student Student Record subclassOf hasRecord :Person rdf:type owl:Class ; rdfs:label "Person"@en. :Student rdf:type owl:Class ; rdfs:subClassOf :Person ; rdfs:label "Student"@en . :hasRecord rdf:type owl:ObjectProperty , owl:FunctionalProperty ; rdfs:domain :Student ; rdfs:range :StudentRecord ; rdfs:label "has record"@en . components: schemas: Person: type: object properties: name: type: string Student: allOf: - $ref: '#/components/schemas/Person' - type: object properties: hasRecord: items: $ref: '#/components/schemas/StudentRecord type: array maxItems: 1 OWL (ttl) OAS (yaml)
  • 10. Information Sciences Institute OBA: Ontology Based APIs OWL Ontology SPARQL endpoint OpenAPI Specification (OAS) REST API Server OWL to OAS Mapping Generate and test server Automated JSON to RDF handling Generate clients
  • 11. Information Sciences Institute Generating the server: Workflow OpenAPITools / openapi-generator stain / owl2jsonld
  • 12. Information Sciences Institute OBA: Ontology Based APIs OWL Ontology SPARQL endpoint OpenAPI Specification (OAS) REST API Server OWL to OAS Mapping Generate and test server Automated JSON to RDF handling Generate clients
  • 13. Information Sciences Institute From RDF to JSON https://w3c.github.io/json-ld-framing/
  • 14. Information Sciences Institute Custom Queries Additional queries may be required in the API 1. Create a new query – CONSTRUCT 1. Define query parameters – Basil’s convention 1. Add path to OAS Basil custom_paths: /custom/models/variable: get: description: Get models by variable name parameters: - description: Name of the custom query in: query name: custom_query_name required: false schema: default: custom_models_variable type: string - description: variable to search in: query name: label required: true schema: type: string responses: 200: content: application/json: ...
  • 15. Information Sciences Institute OBA: Ontology Based APIs OWL Ontology SPARQL endpoint OpenAPI Specification (OAS) REST API Server OWL to OAS Mapping Generate and test server Automated JSON to RDF handling Generate clients
  • 16. Information Sciences Institute Generating your own client Example: https://model-catalog-python-api-client.readthedocs.io/en/latest/models/ ...
  • 17. Information Sciences Institute Performance 150 ms (max) of delay 60 req/sec (With reverse proxy caching enabled)
  • 18. Information Sciences Institute Conclusions and Future Work Using SPARQL endpoints as a non Semantic Web expert is challenging - Need to know SPARQL - Need to understand the ontologies used to represent the data - Need to understand documentation and examples OBA enables KG engineers to easily expose REST APIs from their ontologies/vocabularies: - Create an OAS specification from an ontology - Generate a REST server that accepts and returns JSON following the OAS - Generate tests Next for OBA: JSON-LD, GraphQL support, advanced SHACL validation
  • 19. Information Sciences Institute Help us improve OBA Documentation: https://oba.readthedocs.io/en/latest/ GitHub: https://github.com/KnowledgeCaptureAndDiscovery/OBA/ Examples: https://oba.readthedocs.io/en/latest/examples/ OWL SPARQL JSON-LD OpenAPI + documentation REST JSON
  • 20. Information Sciences Institute Acknowledgements Yolanda Gil Hernan Vargas Oscar Corcho Paola Espinoza Carlos Badenes Karl Hammar Anonymous ISWC reviewers This work was funded by the Defense Advanced Research Projects Agency with award W911NF-18-1-0027 and the National Science Foundation with award ICER-144032
  • 21. Information Sciences Institute OBA: An Ontology-Based Framework for Creating REST APIs for Knowledge Graphs Daniel Garijo and Maximiliano Osorio dgarijo@isi.edu @dgarijov