National Finnish Ontology Service ONKI: Ontologies | Documentation | Sign Up | Upload | Feedback&Suggestions | About ONKI

Upper

Class Ontologies

Instance Ontologies

Thesauri

Geography

Class Ontologies

Instance Ontologies

Domain

Class Ontologies

Thesauri

Cultural

Class Ontologies

Thesauri

Health

Class Ontologies

Thesauri

Agriforest

Class Ontologies

Natural science

Thesauri

Business

Class Ontologies

Thesauri

Public Administration

Class Ontologies

Thesauri

ONKI REST API (beta)

General information about the API

The REST API of the ontology service ONKI is still in the testing phase, so using it in production systems is not encouraged yet. Some of the methods are not optimized, so please delays in responses. Also, the methods of the interface may be changed without notice. Improvement ideas and problem reports can be sent via the feedback form of the ONKI service.

The REST API is used by making HTTP GET requests to URLs which are formed as follows:
http://www.yso.fi/key-[YOUR_ONKI_KEY]/onki/[ONTOLOGY_ID]/rest/[METHOD_NAME][?][PARAMETERS]


The responses of the REST API are in JSON format.

Methods of the API

The status information of the server: The ontology metadata: Concept search: Concept hierarchy: Concept information: Ontology directory:

The required parameters are marked as bold.

The status information of the server

ping

description: testing: is the server running
parameters: -
response: "1"

The ontology metadata

getMetadata

description: metadata about the ontology
parameters: response: metadata about the ontology

getAvailableLanguages

description: available languages of concept labels in the ontology
parameters: -
response: list of language codes

getAvailableTypeUris

description: available types of the concepts in the ontology
parameters: -
response: list of concept type URIs

Concept search

search

description: concept search
parameters: response: metadata about the query and list of search results with label matched (prefLabel/altLabel) and URI

Concept hierarchy

getConceptHierarchy

description: concept hierarchy (superconcepts/subconcepts/sibling concepts)
parameters: response: list of hierarchy tree nodes with URI, label, superconcept URI, indent level (for helping user interface generation)

getHierarchyRoots

description: the roots of a concept's hierarchy, or if the URI is not given, all the concepts of the ontology which have no superconcepts
parameters: response: list of concepts with URI and label

Concept information

getProperties

description: properties of the concept
parameters: response: list of property-value pairs with property URI, label and object URI and label (in case of resource value) or literal and languge code (in case of literal value)

getLabels

description: labels of the concept
parameters: response: list of labels with language code, property URI and property label

getAltLabels

description: alternative labels of the concept
parameters: response: list of alternative labels with language code, property URI and property label

getDescriptions

description: descriptions of the concept
parameters: response: list of descriptions with language code, property URI and property label

getEquivalentConcepts

description: equivalent concepts
parameters: response: list of property-concept pairs with property URI, label and concept URI and label

getRelatedConcepts

description: associative concepts / related concepts
parameters: response: list of property-concept pairs with property URI, label and concept URI and label

getGroups

description: groups the concept belongs to
parameters: response: list of property-group pairs with property URI, label and group URI and label

getTypes

description: types of the concept
parameters: response: list of property-type pairs with property URI, label and type URI and label

getFullPresentation

description: all the relevant information about the concept (merges methods getProperties, getLabels etc. in a single method call)
parameters: response: list of method name - response pairs

Ontology directory

getDirectory

description: ontology directory - alphabetical index, groups (e.g. YSA) or topconcepts (SKOS vocabularies)
parameters: response: list of directory elements (group, topconcept, alphabet) with URI (group/topconcept), label, amount of concepts beloging to the directory element and a list of belonging concepts

Please discuss this page!

blog comments powered by Disqus