REST API for ontologies

Is there any good practices or standardization efforts for designing REST API for ontologies? Is there any implementation that could be used as reference?

Here an example of what I mean by REST API: The values in brackets are parameters of the REST API


Given that an ontology is in essence a ordinary RDF dataset, the Linked Data Platform could partially satisfy your needs.

In essence LDP defines ways for retrieving and manipulating RDF resources using HTTP methods. It is a generic specification and I don't think it defines ways of manipulating related collecitons like in your example. There are containers though but these are somewhat different.

I know of no better option.

Both SPARQL Protocol and SPARQL Graph Store Protocol define RESTful interfaces for interacting with RDF data sources (and therefore, OWL ontologies). They are storage-centric rather than model-centric, but they are standards, implemented by several software toolkits out there, and they can perform any query or manipulation operation you'd care to throw at it.

Several toolkits implement both of the above protocols as part of a larger framework-specific HTTP protocol. For example, Sesame's HTTP API (disclosure: I'm a Sesame dev) includes both protocols and in addition has several operations that are easy ways to get "common" slices of the information (all statements with a certain subject/predicate/object, all named graphs, one particular named graph, etc).

Resource-centric, the only thing I know of is as Tomasz suggeted, the Linked Data Platform. To be honest, I do not immediately see the added value in having operations like "direct subclasses of" translated into direct URI references (rather than just having the ontology itself available as a resource and using qualified operations on top of that - be it as simple request parameters or more complex stuff like SPARQL queries - to slice the information).

I have recently created Restpark.

It's my way of pushing a standard RESTful interface for accessing RDF data. Still in its very infancy but hopefully it can be something to consider. I personally think the Semantic Web community desperately needs a simpler protocol for querying RDF, along side SPARQL. I have nothing against SPARQL, it's an important standard to have. But something simpler and RESTful needs to be part of the Semantic Web stack.

The entire web community is used to consuming APIs as simple HTTP requests (REST). Would you imagine GitHub, Flickr, or any other web-service API actually exposing SQL instead of their RESTful API? It would make things a bit more complicated, and that's sort of what the current Semantic Web community is doing... pushing SPARQL instead of a simple RESTful API.