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.
The web.xml
, which controls routing incoming requests to
servlets, must be set correctly. The default web.xml
in the
download routes:
/sparql
, /sparql/*
and /service/*
to the Joseki SPARQL protocol servlet/validator
routes to the validation servlet index.html
.Names are relative to the web application name, so http://host/myApp/sparql
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: http://host/localhost:2020/sparql
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 application/sparql-results+json
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 callback
for Yahoo! protocol for JSON.callback
: Used with JSON format for the SPARQL results.
See the Yahoo! documentation.