Joseki supports the HTTP binding for the SPARQL protocol and a protocol for SPARQL/Udpate.
SPARQL/Query and SPARQL/Update are different languages and should be served from different endpoints. See the example configuration files.
The query protocol is described in the SPARQL Protocol Specification.
A SPARQL/Update request is POST'ed to an update endpoint (URL). Only POST is supported.
The SPARQL/Update request is a string in the format described in the SPARQL/Update submission to W3C.
The request can go in to the URL itself using
?request=... or in
the body of the HTTP POST.
web.xml, which controls routing incoming requests to
servlets, must be set correctly. The default
web.xml in the
/service/*to the Joseki SPARQL protocol servlet
/validatorroutes to the validation servlet
Names are relative to the web application name, so
routes according to
/sparql in the web.xml file. The default setup
provided in the download has a web application of /joseki set to the root
application so URLs look like:
because the server port defaults to port 2020.
Some additional parameters are supported for SPARQL/Query: use of these parameters is outside the SPARQL protocol and are not available on all SPARQL servers.
Additional provides the
MIME type for the
JSON format for SPARQL query results.
stylesheet: Includes a style sheet directive with the given URL in SPARQL XML results format responds.
accept: Normally, the request uses the HTTP Accept header to request a particular format. Occasionally, it is hard to set the header in some toolkits or the header may be chosen automatically. This parameter is used to override the request HTTP header for explicit control. It's use is not recommended when the Accept request header can be used.
output: request output to be serialized as for a particular content type but get the HTTP response type set to text/plain regardless. Used for debugging and also with
callbackfor Yahoo! protocol for JSON.
callback: Used with JSON format for the SPARQL results. See the Yahoo! documentation.