2

I am trying to inset data in a jena fuseki graph using this simple query:

PREFIX test: <http://test.org> 
INSERT {?subject test:hasName "Bob"} 
WHERE{
  ?subject test:hasEmail "email@test.com" .
}

However, i get the error: Error 400: SPARQL Query: No 'query=' parameter

Fuseki - version 2.3.1 (Build date: 2015-12-08T09:24:07+0000)

What does this error mean, and how can i resolve it? this error also appear when i try to delete data. Thanks.

Daniel Valland
  • 1,057
  • 4
  • 21
  • 45
  • How are you querying the triple store? This seems an HTTP request error (you are missing the `query` parameter). – Giuseppe Marra Feb 17 '16 at 09:07
  • @Giuseppe Marra I am using the query tab in jena fuseki. That is why the error is strange, unless the gui is sending sparql queries as a get request to itself... – Daniel Valland Feb 17 '16 at 09:13
  • 1
    See http://stackoverflow.com/questions/32309632/sparql-insert-data-not-working and check which endpoint are you currently querying – Giuseppe Marra Feb 17 '16 at 09:19
  • This may be a duplicate of http://stackoverflow.com/questions/32309632/sparql-insert-data-not-working that @GiuseppeMarra linked to. – Ben Companjen Jan 13 '17 at 09:29

1 Answers1

4

Make sure you are pointing at the appropriate endpoint. In Fuseki the queries endpoint (for example, http://localhost:13030/mygraph/query) is different than the update endpoint (http://localhost:13030/mygraph/update).

Selects, asks and constructs should be done using the first one, while updates, inserts and deletes should be done using the second one.