I am trying to do a simple insert query in the web interface of Fuseki server. I have set the endpoint to /update
(instead of the default /sparql
).
I have the following query from https://www.w3.org/Submission/SPARQL-Update/:
PREFIX dc: <http://purl.org/dc/elements/1.1/>
INSERT { <http://example/egbook3> dc:title "This is an example title" }
This query gets translated to:
http://localhost:3033/dataset.html#query=PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0AINSERT+%7B+%3Chttp%3A%2F%2Fexample%2Fegbook3%3E+dc%3Atitle++%22This+is+an+example+title%22+%7D%0A
or
curl http://localhost:3033/infUpdate/update -X POST --data 'update=PREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0AINSERT+%7B+%3Chttp%3A%2F%2Fexample%2Fegbook3%3E+dc%3Atitle++%22This+is+an+example+title%22+%7D%0A' -H 'Accept: text/plain,*/*;q=0.9'
as visible using the Share your query
button.
The query returns the following error:
Error 400: Encountered "<EOF>" at line 2, column 73.
Was expecting one of:
"where" ...
"using" ...
Fuseki - version 2.4.0 (Build date: 2016-05-10T11:59:39+0000)
The error occurs both in the web interface and with curl
. What could be the problem here? SELECT
queries work without problems. Loading triples from a file through the web interface upload form also works. Additional question: the normal post request uses query=
and the curl
version uses update=
, why is this different?