OpO A fast graph database
OpO

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

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

Three formats are supported for retrieval, N-Quads, 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-Quads.

Quad List Retrieval

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

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

The list can be filtered by the graph or by pagination. Pagination uses both the 'page' and the page 'size' to determine which quads are returned in the returned list.

Examples of a GET URL for a list are:

http://www.example.com/quad?full=true&format=n-quads&graph=graph1 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
graph<string>acts as a filter
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 Quad Retrieval

A GET with a URL that includes a quad identifier is used to return the contents of the specified quad 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 quad are:

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

Query parameter options are:

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