The document describes research on generating application programming interfaces (APIs) from ontologies to facilitate consumption of knowledge graphs by application developers. It presents a state of the art analysis of existing approaches for generating APIs from ontologies and outlines a proposed methodology. The methodology includes defining a method for generating APIs based on ontology artifacts like competency questions, and developing a tool called OATAPI to automate API generation. The goal is to help bridge the gap between ontology engineering and application development.
Crossing the chasm between ontology engineering and application development
1. Paola Espinoza-Arias
Supervisor: Prof. Dr. Oscar Corcho
ETSI Informáticos
Ontology Engineering Group
Universidad Politécnica de Madrid, Spain
Crossing the Chasm Between
Ontology Engineering and
Application Development
1st February 2022
2. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
2
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
5. Evaluation
6. Conclusions and Future Directions
3. Crossing the Chasm Between Ontology Engineering and Application Development
Introduction
3
Many organizations follow a
knowledge-driven approach
ontology
developers
application
developers
Challenges:
Production-consumption
Technical
Objective: Facilitate the consumption
of ontology-based Knowledge
Graphs by application developers
4. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
4
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
5. Evaluation
6. Conclusions and Future Directions
5. Crossing the Chasm Between Ontology Engineering and Application Development
Lightweight
Heavyweight
Ontology Development Methodologies
5
Grüninger &
Fox
METHON
TOLOGY
On-To-
Knowledge
NeOn SAMOD LOT
1995 1997 2001 2015 2016 2019
Activities of the Ontology Development Process
6. Crossing the Chasm Between Ontology Engineering and Application Development
Specification
Conceptualiza-
tion
Formalization
Implementation
Maintenance
Kickoff
Refinement
Evaluation
Maintenance
Specification
Scheduling
Conceptualiza-
tion
Formalization
Implementation
Define a test
case
Merge current
model with the
modelet
Refactor the
current model
Specification
Implementation
Publication
Maintenance
Propose
scenarios
Define CQs
Specify
Terminology
Formalize CQs
Include axioms
Define
theorems
Ontology Development Methodologies
6
Grüninger &
Fox
METHON
TOLOGY
On-To-
Knowledge
NeOn SAMOD LOT
1995 1997 2001 2015 2016 2019
Activities of the Ontology Development Process
No details on how to use the ontology after it has been generated
7. Crossing the Chasm Between Ontology Engineering and Application Development
One Ontology = Multiple Artefacts
7
Grüninger &
Fox
METHON
TOLOGY
On-To-
Knowledge
NeOn SAMOD LOT
1995 1997 2001 2015 2016 2019
Ontology Artefacts
CQs
Documentation
Bugs, issues, new
requirements
Intermediate
representations
ORSD
Ontology
ORSD
ORSD ORSD
Semi-formal
description
MS, CQs, GoT
Modelets Queries
Several reusable ontology artefacts
Queries
Acronyms
• CQs = Competency Questions
• ORSD = Ontology Requirements
Specification Document
• MS= Motivating Scenarios
• GoT= Glossary of Terms
8. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
8
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
OBA
OWL2OAS
RAMOSE
Walder
Technologies and Tools
9. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
9
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
OBA
OWL2OAS
RAMOSE
Walder
Technologies and Tools
Software Development Field
10. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
10
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
OBA
OWL2OAS
RAMOSE
Walder
Technologies and Tools
HMTL access to RDF data
11. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
11
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
OBA
OWL2OAS
RAMOSE
Walder
Technologies and Tools
Implements
BASIL
Implements
Implements
HMTL access to RDF data
Implements
Implements
Implements
Implements
12. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
12
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
OBA
OWL2OAS
RAMOSE
Walder
Technologies and Tools
Implements
BASIL
Implements
Implements
HMTL access to RDF data
Implements
Implements
Implements
Implements
Adhoc specifications
13. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
13
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
OBA
OWL2OAS
RAMOSE
Walder
Technologies and Tools
OAS
Main findings from our analysis:
o OpenAPI Specification (OAS) is one of the most common specification used in the Semantic Web
14. Crossing the Chasm Between Ontology Engineering and Application Development
Approaches for the generation of APIs from ontologies
14
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
SPARQL
Protocol
Linked Data
API
OpenAPI
Specification
SPARQL
GSP
Hydra
GraphQL
Linked Data
Protocol
Linked Data
Templates
Solid
Specifications
Virtuoso
Pubby
Puelia ELDA
Apache
Marmotta
BASIL AtomGraph
GRLC
JSON-QB
API
OSF
Trellis
LODI
R4R
Ontology2
GraphQL
Community
Solid Server
RAMOSE
Walder
Technologies and Tools
Main findings from our analysis:
o OpenAPI Specification (OAS) is one of the most common specification used in the Semantic Web
o Most of the technologies and tools generate the API from SPARQL queries
o Recent tools generate the API from OWL ontologies
o The main effort is focused on the technological support for generating APIs
OAS
Ontology2
GraphQL
Ontology
OBA
OWL2OAS
There is not a methodological approach to generate APIs from ontology artefacts
OAS
15. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
15
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
5. Evaluation
6. Conclusions and Future Directions
16. Crossing the Chasm Between Ontology Engineering and Application Development
Objectives
16
O1: To help ontology developers generate APIs to allow
ontology usage and Knowledge Graph data
consumption.
Contribution 1: A method for API generation
Hypothesis 1: It is possible to propose a clearly-
defined and reproducible method that allows
creating APIs from a set of ontology artefacts in
such a manner that these APIs allow getting data
from Knowledge Graphs.
O2: To automate the API generation process from
ontology artefacts generated during the ontology
development process.
Contribution 2: A tool for supporting API generation
(OATAPI)
Hypothesis 2: It is possible to automatically
generate APIs (based on ontology artefacts) that
are indistinguishable from the APIs that would be
defined by application developers in real use
cases.
Hypothesis 3: It is possible to automatically
generate APIs (based on ontology artefacts) that
are similar to the APIs defined manually
according to our proposed method.
Is it possible to generate APIs based on the artefacts created by ontology developers
during the ontology development process?
17. Crossing the Chasm Between Ontology Engineering and Application Development
Assumptions and Restrictions
17
Assumptions
• A1: A set of competency questions is defined before implementing any ontology, and these questions are available.
• A2: APIs are data consumption interfaces that are well-known by application developers.
• A3: The provision of APIs for KG data consumption is a common practice in the Semantic Web field.
• A4: Competency questions can be translated into APIs, which provide data required for their expected answers.
• A5: KGs contain data organized according to ontologies from which the API has been derived.
• A6: Competency questions are written in natural language following state of the art practices.
• A7: Ontologies have labels that make their elements human readable.
Restrictions
• Ontologies:
R1: Implemented in OWL
R3: Contain labels defined in English
R5: If do not contain labels, the URI of elements must be defined with short and compact natural language names
R6: Evaluated and do not contain errors
R7: Data and object properties must have a domain and range explicitly defined
• Competency questions:
R2: Must be written in English
R4: Its main terms are the same as the labels of ontology elements.
18. Crossing the Chasm Between Ontology Engineering and Application Development
Research Methodology
18
Field Research
Work
Survey Development Implementation
Ontology Development
Definition of APIs to
provide access to
ontology-based data
Analysis of specifications,
tools and technologies for
API generation
Method for API generation
based on ontology
artefacts
Refinement of the method
for API generation based
on ontology artefacts
OATAPI
Phases
Activities
2nd 3rd 4th
1st
19. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
19
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
o Method for API generation based on ontology artefacts
o OATAPI
5. Evaluation
6. Conclusions and Future Directions
20. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts
20
Legend Phase Artefacts
phase flow
Ontology
requirements
specification
Ontology
implementation
ORSD
Ontology
maintenance
Issues, bugs, etc.
Ontology
Ontology
publication
Online ontology
LOT methodology base workflow
http://lot.linkeddata.es/
Ontology
exploitation
API
output
Actors
• Ont. Devel.
• Users
• Experts
• Ont. Devel.
• Users
• Experts
• Ont. Devel.
• Users
• Experts
• Ont. Devel.
• Users
• Experts
• Ont. Devel.
• App. Devel.
21. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts
21
Legend
Activity Artefacts
activity flow
API Design API Specification
API Design Details
API validation
Validated API
API Definition
API Implementation
Implemented API
API Deployment
Deployed API
output
Actors
• Ont. Devel.
• App. Devel.
• Ont. Devel.
• App. Devel.
• Ont. Devel. • Ont. Devel.
• App. Devel.
• Ont. Devel.
• App. Devel.
(Input) Artefact
reference
X
Referenced artefacts from other
activities
Competency Questions
5
Ontology serialization (OWL)
8
Ontology Exploitation
14 15 16 17 18
5, 8 14 15 16 17
22. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts: Design
22
Legend
Task Artefacts
task flow
API paradigm
selection
API Paradigm
output
(Input) Artefact
reference
X
20
Design Specification Validation
Implementation Deployment
Decide how the API will behave, the resources and operations required
23. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts: Design
23
Legend
Task Artefacts
task flow
API paradigm
selection
Operations
detection
API Paradigm
Query generation
SPARQL queries
List of API
operations
Ontology elements
identification
List of ontology
elements
output
(Input) Artefact
reference
X
Referenced artefacts from other activities
Competency Questions
5
Ontology serialization (OWL)
8
Competency Questions Analysis
20 21 22 23
5
8
Design Specification Validation
Implementation Deployment
Decide how the API will behave, the resources and operations required
24. Crossing the Chasm Between Ontology Engineering and Application Development
Example of Competency Question Analysis
24
Give me the details of the terrace that belongs to a local business.
GET Class Class
Object Property
http://vocab.ciudadesabiertas.es/def/comercio/tejido-comercial
Operation
GET
PREFIX escom:<http://vocab.ciudadesabiertas.es/def/comercio/tejido-comercial#>
CONSTRUCT { ?terrace ?predicate ?object }
WHERE { {
SELECT DISTINCT ?terrace
WHERE {?terrace escom:perteneceALocal ?local-business-id}
}
?terrace ?predicate ?object }
Operation Ontology Elements API path
GET Local Business, belongs
to local, Terrace
/local-businesses/{local-business-id}/
terraces
Operation Ontology Elements
GET Local Business, belongs
to local, Terrace
List of terms and their correspondences
to operations
Rules for naming REST APIs based on
ontology artefacts
25. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts: Design
25
Legend
Task Artefacts
task flow
API paradigm
selection
Operations
detection
API Paradigm
Query generation
SPARQL queries
List of API
operations
Ontology elements
identification
List of ontology
elements
Authentication/
authorization
mechanisms
selection
Authentication /
authorization
method
output
(Input) Artefact
reference
X
Referenced artefacts from other activities
Competency Questions
5
Ontology serialization (OWL)
8
Competency Questions Analysis
20 21 22 23 24
5
8
Design Specification Validation
Implementation Deployment
Decide how the API will behave, the resources and operations required
26. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts: Specification
26
Description of the decisions taken on the API Design
o IDLs such as OAS, JSON API, among others.
Design Specification Validation
Implementation Deployment
API specification template
Metadata
Resources
Status
27. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts: Implementation
27
Design Specification Validation
Implementation Deployment
Server
SPARQL
endpoint
API
Client
Develop the server-side functionality
Request Request Query
Data Data Data
28. Crossing the Chasm Between Ontology Engineering and Application Development
CONSTRUCT { ?terrace ?predicate ?object }
WHERE { {
SELECT DISTINCT ?terrace
WHERE {?terrace escom:perteneceALocal data:10003602}}
?terrace ?predicate ?object }
Test the API’s behavior
Method for API generation based on ontology artefacts: Validation
28
Design Specification Validation
Implementation Deployment
Server
SPARQL
endpoint
Client
GET /local-businesses/10003602/terraces
escom:area ”15"^^xsd:float ;
escom:numeroDeMesasAutorizadas ”6"^^xsd:integer ;
escom:numeroDeSillasAutorizadas ”18"^^xsd:integer ;
...
{
”area" : ”15"
”numberOfTables" : ”6"
”numberOfChairs" : ”6"
...
}
CQs
PREFIX escom:<http://vocab.ciudadesabiertas.es/def/comercio/tejido-comercial#>
PREFIX data:<http://vocab.ciudadesabiertas.es/comercio/tejido-comercial/data/>
29. Crossing the Chasm Between Ontology Engineering and Application Development
Method for API generation based on ontology artefacts: Deployment
29
Design Specification Validation
Implementation Deployment
Make the API on-line available:
o Publish the API in a production environment
o Make the API specification available
o Make the API findable on the Web:
https://www.programmableweb.com
http://smart-api.info/registry
30. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
30
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
o Method for API generation based on ontology artefacts
o OATAPI
5. Evaluation
6. Conclusions and Future Directions
31. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
31
Ontology Artefacts to API (OATAPI)
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
API paths
generation
Query
generation
Queries
Paths
32. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
32
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
CQ breakdown
API paths
generation
Query
generation
Queries
Paths
33. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
33
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
Operations
detection
Term REST operation
give, list, which, what,
who, ….
GET GET
API paths
generation
Query
generation
Queries
Paths
34. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
34
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Queries
Paths
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
API paths
generation
Query
generation
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
Ontology
elements
identification
Local
Business
Terrace
Opening
License
…… ……
Ontology Elements
Local Business, belongs to local, Terrace
35. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
35
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Queries
Paths
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
API paths
generation
Query
generation
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
API paths
generation
Terrace
Opening
License
…… ……
Local
Business
36. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
36
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Queries
Paths
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
API paths
generation
Query
generation
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
API paths
generation
Terrace
Opening
License
…… ……
Local
Business
37. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
37
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Queries
Paths
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
API paths
generation
Query
generation
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
API paths
generation
Terrace
Opening
License
…… ……
Local
Business
/local-businesses/{local-business-id}/terraces
38. Crossing the Chasm Between Ontology Engineering and Application Development
OATAPI
38
Ontology Artefacts to API
o Automates the generation of REST API paths and SPARQL queries
CQs
Ontology
Queries
Paths
Analysis of competency questions
CQ
breakdown
Operations
detection
Ontology
elements
identification
API paths
generation
Query
generation
Code is available in GitHub under Apache License 2.0: https://github.com/paoespinozarias/oatapi
Query
generation
Terrace
Opening
License
…… ……
Local
Business
PREFIX escom:<http://vocab.ciudadesabiertas.es/def/comercio/tejido-comercial#>
CONSTRUCT { ?terrace ?predicate ?object }
WHERE { {
SELECT DISTINCT ?terrace
WHERE {?terrace escom:perteneceALocal ?local-
business-id}
}
?terrace ?predicate ?object }
39. Crossing the Chasm Between Ontology Engineering and Application Development
Technological support for the API generation method
39
Queries
Paths
OATAPI
Design Specification Validation
Implementation Deployment
Mapping
OWLtoOAS
Mapping OWLtoOAS: https://owl-to-oas.readthedocs.io/en/latest/mapping
OAS
Ontology Based APIs (OBA)
Server
functionality
Contribution of this thesis Tool from the State of the Art
Ontology Based APIs https://oba.readthedocs.io/en/latest/
40. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
40
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
5. Evaluation
6. Conclusions and Future Directions
41. Crossing the Chasm Between Ontology Engineering and Application Development
Indistinguishable API paths
41
Hypothesis 2: It is possible to automatically generate APIs (based on
ontology artefacts) that are indistinguishable from the APIs that would be
defined by application developers in real use cases.
Experiment:
o Testbed composed by:
• 3 Ontologies and 9 CQs
• API paths from real use case
• API paths generated by OATAPI
o Questionnaire to ask participants the way API paths from the testbed were
generated
o 20 participants evaluated
42. Crossing the Chasm Between Ontology Engineering and Application Development
Results for the experiment on indistinguishable API paths
42
CQ
API path from use cases
(1st API shown in the
questionnaire)
API path from OATAPI
(2nd API shown in the
questionnaire)
API path generation
1st automatically
and 2nd manually
2nd automatically
and 1st manually
Both
manually
Both
automatically
Indistingui-
shable
What are the local
businesses of the city?
/local-business/local-business /local-businesses
50% 10% 5% 10% 25%
Obtain the information
of a certain terrace.
/local-business/terrace/{id} /terraces/{terrace-id}
25% 15% 15% 10% 35%
List all the shopping
areas of the city.
/local-business/shopping-area /shopping-areas
35% 15% 15% 5% 30%
What are the air quality
stations?
/service/air-quality/list /air-quality-stations
45% 15% 5% 10% 25%
What is the information
of an air quality
station?
/service/air-quality/
list?rf=htmlsrsname=
utm30nid=14
/air-quality-stations/{air-
quality-station-id} 40% 20% 5% 5% 30%
What are the air quality
observations?
/service/air-quality /air-quality-observations
35% 10% 5% 10% 40%
List all contracts of the
city.
/service/public-
procurement/contract
/contracts
30% 25% 5% 5% 35%
What are the details of
a contracting
organization?
/service/public-
procurement/contracting-
body/{id}
/organizations/{organization-
id} 30% 15% 15% 5% 35%
What are the details of
a notice?
/service/public-procurement/
notice/{idNotice}
/notices/{notice-id}
30% 20% 10% 5% 35%
Hypothesis 2
43. Crossing the Chasm Between Ontology Engineering and Application Development
Results for the experiment on indistinguishable API paths
43
CQ
API path from use cases
(1st API shown in the
questionnaire)
API path from OATAPI
(2nd API shown in the
questionnaire)
Preference
1st 2nd Both No preference
What are the local
businesses of the city?
/local-business/local-business /local-businesses
5% 90% 5%
Obtain the information
of a certain terrace.
/local-business/terrace/{id} /terraces/{terrace-id}
50% 30% 15% 5%
List all the shopping
areas of the city.
/local-business/shopping-area /shopping-areas
30% 60% 5% 5%
What are the air quality
stations?
/service/air-quality/list /air-quality-stations
20% 70% 5% 5%
What is the information
of an air quality
station?
/service/air-quality/
list?rf=htmlsrsname=
utm30nid=14
/air-quality-stations/{air-
quality-station-id} 15% 80% 5%
What are the air quality
observations?
/service/air-quality /air-quality-observations
35% 50% 10% 5%
List all contracts of the
city.
/service/public-
procurement/contract
/contracts
50% 45% 10% 5%
What are the details of
a contracting
organization?
/service/public-
procurement/contracting-
body/{id}
/organizations/{organization-
id} 35% 50% 10% 5%
What are the details of
a notice?
/service/public-procurement/
notice/{idNotice}
/notices/{notice-id}
20% 60% 15% 5%
API paths generated by OATAPI are preferred
44. Crossing the Chasm Between Ontology Engineering and Application Development
Similarity between API paths
44
Hypothesis 3: It is possible to automatically generate APIs (based on
ontology artefacts) that are similar to the APIs defined manually
according to our proposed method
Experiment:
o Testbed composed by:
• 8 Ontologies and 228 CQs
• API paths manually generated according to the proposed method (50)
• API paths generated by OATAPI (50)
o Similarity evaluated with the ROUGE metric
45. Crossing the Chasm Between Ontology Engineering and Application Development
Results for the experiment on the similarity between API paths
45
38 API paths were similar
76% from the 50 API paths analyzed Hypothesis 3
API paths by ontology
46. Crossing the Chasm Between Ontology Engineering and Application Development
Outline
46
1. Introduction
2. State of the Art
3. Methodology
4. Contributions
5. Evaluation
6. Conclusions and Future Directions
47. Crossing the Chasm Between Ontology Engineering and Application Development
Conclusions
47
Facilitate the consumption of ontology-based KGs by application developers
48. Crossing the Chasm Between Ontology Engineering and Application Development
Conclusions
48
Facilitate the consumption of ontology-based KGs by application developers
O1: To help ontology engineers generate APIs to allow
ontology usage and Knowledge Graph data consumption.
O2: To automate the API generation process from ontology
artefacts generated during the ontology development process.
Contribution 1: A method for API generation
Contribution 2: A tool for supporting API generation
(OATAPI)
49. Crossing the Chasm Between Ontology Engineering and Application Development
Conclusions
49
Facilitate the consumption of ontology-based KGs by application developers
O2: To automate the API generation process from ontology
artefacts generated during the ontology development process.
Contribution 1: A method for API generation
Contribution 2: A tool for supporting API generation
(OATAPI)
• The adoption of definitions, techniques, and processes taken from the Software Engineering field is a
common and helpful practice for Ontology Engineering.
• The knowledge acquired about the domain by the ontology developer and the ontology artefacts generated during
the ontology development process can support the generation of APIs.
• Making ontology artefacts publicly available is as important as making their implementation available.
• The definition of competency questions should be as precise as possible.
O1: To help ontology engineers generate APIs to allow
ontology usage and Knowledge Graph data consumption.
50. Crossing the Chasm Between Ontology Engineering and Application Development
Future Directions
50
• OATAPI – From a PoC to a running prototype:
o Adopting a more robust approach for the CQ analysis
o Exploiting inference for ontology element identification
o Enabling synonym detection
o Generating the OAS automatically
o Extension of OATAPI evaluation
• Annotation of CQs
51. Crossing the Chasm Between Ontology Engineering and Application Development
Future Directions
51
• OATAPI – From a PoC to a running prototype:
o Adopting a more robust approach for the CQ analysis
o Exploiting inference for ontology element identification
o Enabling synonym detection
o Generating the OAS automatically
o Extension of OATAPI evaluation
• Annotation of CQs
• API Resource path prediction
• API Version management
• API generation from application requirements
52. Crossing the Chasm Between Ontology Engineering and Application Development
Dissemination
52
Espinoza-Arias P., Garijo, D. and Corcho, O.. Crossing the Chasm Between Ontology Engineering and
Application Development: A Survey. Journal of Web Semantics. 70 (2021).
Espinoza-Arias P., Poveda-Villalón, M., and Corcho, O.. Using LOT methodology to develop a noise pollution
ontology: a Spanish use case. Journal Ambient Intelligence Human Computing 11, 4557–4568 (2020).
Espinoza-Arias P., Fernández-Ruiz, M.J., Morlán-Plo, V., Notivol-Bezares, R. and Corcho, O. The Zaragoza’s
Knowledge Graph: Open Data to Harness the City Knowledge. Information (2020), 11, 129.
Espinoza-Arias P., Garijo D. and Corcho O. (2020) Mapping the Web Ontology Language to the OpenAPI
Specification. In: Grossmann G., Ram S. (eds) Advances in Conceptual Modeling. ER 2020. Lecture Notes in
Computer Science, vol 12584. Springer, Cham
Poveda-Villalón M., Espinoza-Arias P., Garijo D., Corcho O. (2020) Coming to Terms with FAIR Ontologies. In:
Keet C.M., Dumontier M. (eds) Knowledge Engineering and Knowledge Management. EKAW 2020. Lecture
Notes in Computer Science, vol 12387. Springer, Cham.
Espinoza-Arias P., Garijo D. and Corcho O. From Ontology Artefacts to APIs. In preparation to be submitted
to the Knowledge Engineering and Knowledge Management Conference EKAW 2022
Journal
Conference
Workshop
53. Paola Espinoza-Arias
Supervisor: Prof. Dr. Oscar Corcho
ETSI Informáticos
Ontology Engineering Group
Universidad Politécnica de Madrid, Spain
Crossing the Chasm Between
Ontology Engineering and
Application Development
1st February 2022