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

Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databasesSuhad Jihad
 
Aligner vos données avec Wikidata grâce à l'outil Open Refine
Aligner vos données avec Wikidata grâce à l'outil Open RefineAligner vos données avec Wikidata grâce à l'outil Open Refine
Aligner vos données avec Wikidata grâce à l'outil Open RefineGautier Poupeau
 
Chapter 4 ethical and social issues in information systems
Chapter 4 ethical and social issues in information systemsChapter 4 ethical and social issues in information systems
Chapter 4 ethical and social issues in information systemsVan Chau
 
Data Wrangling with Open Refine
Data Wrangling with Open RefineData Wrangling with Open Refine
Data Wrangling with Open RefineLOUIS Libraries
 
Data warehousing - Dr. Radhika Kotecha
Data warehousing - Dr. Radhika KotechaData warehousing - Dr. Radhika Kotecha
Data warehousing - Dr. Radhika KotechaRadhika Kotecha
 
Informatica Online Training
Informatica Online Training Informatica Online Training
Informatica Online Training saikirancrs
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1shahab3
 
Lecture 04 - Granularity in the Data Warehouse
Lecture 04 - Granularity in the Data WarehouseLecture 04 - Granularity in the Data Warehouse
Lecture 04 - Granularity in the Data Warehousephanleson
 
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph Database
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph DatabaseTelecoms Service Assurance & Service Fulfillment with Neo4j Graph Database
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph DatabaseNeo4j
 
Replicon Solution Overview
Replicon Solution OverviewReplicon Solution Overview
Replicon Solution OverviewSunny Aggarwal
 
Oracle Database Security
Oracle Database SecurityOracle Database Security
Oracle Database SecurityTroy Kitch
 
WBS for Agile Business Intelligence Projects
WBS for Agile Business Intelligence ProjectsWBS for Agile Business Intelligence Projects
WBS for Agile Business Intelligence ProjectsFlevy.com Best Practices
 
Unlocking Smart Building Potential with the RealEstateCore Ontology
Unlocking Smart Building Potential with the RealEstateCore OntologyUnlocking Smart Building Potential with the RealEstateCore Ontology
Unlocking Smart Building Potential with the RealEstateCore OntologyMemoori
 
Database Management Systems - Management Information System
Database Management Systems - Management Information SystemDatabase Management Systems - Management Information System
Database Management Systems - Management Information SystemNijaz N
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureJames Serra
 

What's hot (20)

Data models
Data modelsData models
Data models
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databases
 
Aligner vos données avec Wikidata grâce à l'outil Open Refine
Aligner vos données avec Wikidata grâce à l'outil Open RefineAligner vos données avec Wikidata grâce à l'outil Open Refine
Aligner vos données avec Wikidata grâce à l'outil Open Refine
 
Chapter 4 ethical and social issues in information systems
Chapter 4 ethical and social issues in information systemsChapter 4 ethical and social issues in information systems
Chapter 4 ethical and social issues in information systems
 
Data Wrangling with Open Refine
Data Wrangling with Open RefineData Wrangling with Open Refine
Data Wrangling with Open Refine
 
Data warehousing - Dr. Radhika Kotecha
Data warehousing - Dr. Radhika KotechaData warehousing - Dr. Radhika Kotecha
Data warehousing - Dr. Radhika Kotecha
 
Informatica Online Training
Informatica Online Training Informatica Online Training
Informatica Online Training
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1
 
Lecture 04 - Granularity in the Data Warehouse
Lecture 04 - Granularity in the Data WarehouseLecture 04 - Granularity in the Data Warehouse
Lecture 04 - Granularity in the Data Warehouse
 
Data warehouse
Data warehouseData warehouse
Data warehouse
 
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph Database
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph DatabaseTelecoms Service Assurance & Service Fulfillment with Neo4j Graph Database
Telecoms Service Assurance & Service Fulfillment with Neo4j Graph Database
 
Replicon Solution Overview
Replicon Solution OverviewReplicon Solution Overview
Replicon Solution Overview
 
Oracle Database Security
Oracle Database SecurityOracle Database Security
Oracle Database Security
 
WBS for Agile Business Intelligence Projects
WBS for Agile Business Intelligence ProjectsWBS for Agile Business Intelligence Projects
WBS for Agile Business Intelligence Projects
 
ETL Process
ETL ProcessETL Process
ETL Process
 
Unlocking Smart Building Potential with the RealEstateCore Ontology
Unlocking Smart Building Potential with the RealEstateCore OntologyUnlocking Smart Building Potential with the RealEstateCore Ontology
Unlocking Smart Building Potential with the RealEstateCore Ontology
 
Aries
AriesAries
Aries
 
Database Management Systems - Management Information System
Database Management Systems - Management Information SystemDatabase Management Systems - Management Information System
Database Management Systems - Management Information System
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse Architecture
 
Kdd process
Kdd processKdd process
Kdd process
 

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

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 ...Takeshi Morita
 
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 webMarakana Inc.
 
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 developmentPaola Espinoza-Arias
 
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 DataAlbert Meroño-Peñuela
 
Programming the Semantic Web
Programming the Semantic WebProgramming the Semantic Web
Programming the Semantic WebLuigi De Russis
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarShubhra Kar
 
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 CaseJimmy Guerrero
 
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 tutorialMathieu d'Aquin
 
Sem facet paper
Sem facet paperSem facet paper
Sem facet paperDBOnto
 
SemFacet paper
SemFacet paperSemFacet paper
SemFacet paperDBOnto
 
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 2015Jackson F. de A. Mafra
 

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

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 principlesdgarijo
 
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 Futuredgarijo
 
Towards Reusable Research Software
Towards Reusable Research SoftwareTowards Reusable Research Software
Towards Reusable Research Softwaredgarijo
 
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 documentationdgarijo
 
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 Datasetsdgarijo
 
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 Metadatadgarijo
 
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...dgarijo
 
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 Datadgarijo
 
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...dgarijo
 
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 2019dgarijo
 
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 Sciencedgarijo
 
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
 
WIDOCO: A Wizard for Documenting Ontologies
WIDOCO: A Wizard for Documenting OntologiesWIDOCO: A Wizard for Documenting Ontologies
WIDOCO: A Wizard for Documenting Ontologiesdgarijo
 
Towards Automating Data Narratives
Towards Automating Data NarrativesTowards Automating Data Narratives
Towards Automating Data Narrativesdgarijo
 
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 Workflowsdgarijo
 
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 Softwaredgarijo
 
OEG tools for supporting Ontology Engineering
OEG tools for supporting Ontology EngineeringOEG tools for supporting Ontology Engineering
OEG tools for supporting Ontology Engineeringdgarijo
 
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 GeoSciencesdgarijo
 
Reproducibility Using Semantics: An Overview
Reproducibility Using Semantics: An OverviewReproducibility Using Semantics: An Overview
Reproducibility Using Semantics: An Overviewdgarijo
 
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 workflowsdgarijo
 

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

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
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.pdfJiananWang21
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 

Recently uploaded (20)

(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
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
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 

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