API

This page contains the documentation of the KORBO APIs: it will be constantly updated while the software is under development.

The KORBO platform was born with a complete set of API in order to stimulate the reuse of collected and augmented data by developers in building new application based on generic data model or specific ones.

KORBO APIs can be classified in the following types:

Linked Data APIs
Korbo exposes resources conforming to the Linked Data principles, using dereferenciable URLs. Main resources in Korbo are Items and Baskets (collections of items). Korbo provides Linked Data access to such resources relying on ELDA.
Public retrieve REST APIs
Metadata information saved in the storage system (DB+Triple Store), can be accessed using Public retrieve API. These APIs retrieve mainly from a optimized relational DB suitably synchronized with the Triple Sotre: they are fast and usable as a starting point for the application based on KORBO platform.
Basket SPARQL PROXY
When a basket is created a sparql-endpoint is automatically created with a dedicated url. Developers can use directly this feature to develope application. This feature is under development but is not yet stable.
Private retrieve REST APIs
A basket can be defined as private o public. These APIs are the same Public retrieve APIs but an authentication is required. These APIs are not yet developed.
Private update REST APIs
These APIs require authentication, they can be used to update data on the storage system dedicated the user basket. These APIs are not yet developed.
Private notify REST APIs
These APIs require authentication, they can be used to nnotify to KORBO something and consequently some operation (like content provider synchronization) on the user basket and items. These APIs are not yet developed.

Linked data API

Korbo exposes resources conforming to the Linked Data principles, using dereferenciable URLs.
Main resources in Korbo are Items and Baskets (collections of items). Korbo provides Linked Data access to such resources relying on ELDA. Linked Data URLs are composed as follows:

{korbo-instance-host}/elda/api/korbo/item/{item-id}
{korbo-instance-host}/elda/api/korbo/basket/{basket-id}
Where {korbo-instance-host} is the host of the specific instance of Korbo. For example the demo instance host is "http://korbo.netseven.it".
Specific representation formats can be requested using standard HTTP header "Accept:" or by appending appropriate file extension to the URL.

This table represents the supported formats:
Type Accept File extension
RDF/XML application/rdf+xml .rdf
Turtle text/turtle .ttl
JSON ? .json
XML text/xml .xml

Using PURLs as URL identifiers

In order to provide stable identifiers to resources in cases where a Korbo instance moves to an other server we encourage the use of a redirection layer as Purl.org. Purls are used as identifiers for the resources.
For example, the demo instance uses the following purls:

Korbo baskets: http://purl.org/net7/korbo/basket/{basket-id}
Korbo items: http://purl.org/net7/korbo/item/{item-id}

Resolving such URLs results in a redirects (e.g. 302 FOUND) to {{korbo-instance-host}}/elda/api/korbo/item/{item-id} or {korbo-instance-host}/elda/api/korbo/basket/{basket-id}.