The Ontology Lookup Service (OLS), or ontologies server, aims to store and maintains ontologies used to manipulate avatars in Thingin. That is, only ontologies present in OLS can be used to create, search, update, or delete avatars. The incentive to store those ontologies in our platform is durability and stability. In fact not all ontologies are available online. Sometimes there are not publicly accessible online or they may not be available all the time. Storing ontologies and maintaining their availability and durability allows to have more control on the stability of the platform by depending less on external services.
The other goals of the ontologies server is to provide search capabilities on ontologies concepts. That is, using a REST and/or GraphQL APIs, developers can download ontologies registered in the system and search among those ontologies, concepts to better describe semantically their data. Not all ontologies of the world are registered in OLS. Developers can use the REST APIs to import new ontologies in the system. To ensure a certain level of integrity and/or quality we have a validation process on new ontologies before they can be used to manipulate avatars.
In the following we present how to access and use the different APIs.
OLS can be accessed using the Thingin portal.
The interface allows to perform the following:
Click on menu Explore
and Explore Ontology Lookup Service
Click on the Get list
button to get all the ontologies of the system. They are grouped by version numbers. You can also filter the ontologies list using ''title, prefix, or tags''.
You can click on the ontologies title to display details information of that ontology.
Click on menu Explore
and Explore Ontology Lookup Service
You can filter the list of ontologies by tags which are keyword associated to ontologies to grow them by topics. To do so, click on the Get tags
button, it will display different tags registered on the ontologies. Clicking on one of the tags will display the list of ontologies related to that tag.
The interface allows to search for classes using a keywords-based. The search can be configured to be applied on name, label, comment and/or tag fields of classes.
If your role in Thingin is provider
, you can submit file to create or update ontologies
Click on menu Provide
and Ontologies
OLS provides a swagger documentation describing the REST and GraphQL API.
The REST API allows to :
The API support ontologies written with the Ontology Web Language (OWL). OLS uses the OWL API so serialization formats such as owl/xml or turtle are supported. Responses on search requests are in Json Format and download of ontologies in owl+xml format
The API handle upload of ontologies via POST or PUT requests. A validation step is required by an OLS Thing in admin. Once ontologies are validated, they can be used to manipulate avatars.
Uploading new ontologies can be done by uploading the ontology file and all their dependencies. The import resolution will be done it the followin sequence:
Hereafter a request to register an ontology A.owl and its import.
curl -v -X POST -F “file=@A.owl” -F “file=@B-The-Import-Of-A.owl" http://@OLS-URL/api/v2/ontologies
New ontologies versions can be registered using the HTTP PUT request. However unlike the previous method, import files can be ommitted if they already exist in the platform. The import resolution will be done it the followin sequence:
Hereafter a request to register a new version of the ontology A.owl
curl -v -X PU -F “file=@A-v2.owl” -F http://@OLS-URL/api/v2/ontologies