OpO FAST Triple Store, Web Server, and JSON Database
OpO

The HTTP REST triple read API allows for getting a list of available triples listed by triple node identifiers. It also allows retrieval of an individual triple by node identifier.

All reads use the HTTP GET method. Query options are allowed for both list retrieval and for individual triple retrieval.

Two formats are supported for retrieval, N-Triples and OG. OG is the Opo Graph format. Options for inclusion of comments and comment contents are available. Since some browsers don't support some of the format directly an option for text Content-Type is also available. Specifying a format of TURTLE or JSON reverts to N-Triples.

Triple List Retrieval

A GET with a URL that does not include a triple identifier will return a list of all triples filtered or paginated if specified as such. Without other options the returned list is a text list of all the triple identifiers which are either the triple names or the top blank node identifier for un-named triples.

Instead of a list of triple identifiers the full triple can be returned. By setting the 'full' option to true the 'format', 'text', and 'with_id' options become active. If just listing the triple identifiers they do not effect the returned list.

The list can be paginated. Pagination uses both the 'page' and the page 'size' to determine which triples are returned in the returned list.

Examples of a GET URL for a list are:

http://www.example.com/triple?full=true&format=n-quads http://www.example.com/quad?page=2&size=50 http://www.example.com/quad

Query parameter options are:

OptionValuesDescription
formatturtle | og | n-quadsreply format if full
texttrue | falseContent-Type text/plain
fulltrue | falselist full quad
with_idtrue | falsenode identfier in comment
page<integer>page to retrieve
size<integer>page size
Individual Triple Retrieval

A GET with a URL that includes a triple identifier is used to return the contents of the specified triple in the specified format. Options include specifying the desired format and if the format supports comments then the 'with_id' option is also supported.

Examples of a GET URL for a specific triple are:

http://www.example.com/triple/000000000000010f?format=n-triples&with_id=true http://www.example.com/triple/000000000000010f

Query parameter options are:

OptionValuesDescription
formatturtle | og | n-quadsreply format
texttrue | falsereply Content-Type text/plain
with_idtrue | falsenode identfier in comment