rdflib 5.0 SPARQLUpdate returns 415 for ontotext graphdb

150 views
Skip to first unread message

jue...@gmail.com

unread,
Nov 20, 2018, 11:11:59 AM11/20/18
to rdflib-dev
Hi all,

i try to run rdflib 5.0 with the SPARQLUpdateStore against graphdb from ontotext (actually against their rdf4j RestAPI) .

Anybody knows how I could do SPARQL UPDATE queries with rdflib 5.0 against their store.

Authentication works but i get an HTTP response code of 415 with message "unrecognized mime type".
I assume it is because rdflib currently sends the data as byte string.
And it seems we would need the POST body to start with "update: INSERT ...".
Also i do not see that the Content-Type header field is set in the POST request.

Looking at the removed SPARQLWrapper library is see that SPARQL update POST queries can be encoded in two ways:
if self.requestMethod == POSTDIRECTLY:
request.add_header("Content-Type", "application/sparql-update")
request.data = self.queryString.encode('UTF-8')
else: # URL-encoded
request.add_header("Content-Type", "application/x-www-form-urlencoded")
request.data = self._getRequestEncodedParameters(("update", self.queryString)).encode('ascii')

Best
Jürgen

juergen...@onlim.com

unread,
Apr 20, 2020, 6:19:11 PM4/20/20
to rdflib-dev
Hi all,

great to see rdflib5, but i am missing documentation and examples for the SPARQLUpdateStore.

There is still the problem that the update does not work with remote endpoints and we still get a 415 for updates using grpahdb https.

Best

Nicholas Car

unread,
Apr 21, 2020, 5:02:33 AM4/21/20
to rdfli...@googlegroups.com
Hi Joergen,

Can you please add to any existing Issues about this problem or create a new one? I think it has been identified elsewhere (were you already involved in a conversation about this perhaps?). I want to make sure there is a record of this in the GitHub tracking. It’s certainly a bug that needs fixing before 6.0.0 so I’ll tag any Issue you create (or a PR??) for the 6.0.0 Milestone.

Thanks,

Nick 

— 
Dr Nicholas Car
Data Systems Architect
SURROUND Australia
0477 560 177

On 21 Apr 2020, at 8:19 am, juergen.umbrich via rdflib-dev <rdfli...@googlegroups.com> wrote:


--
http://github.com/RDFLib
---
You received this message because you are subscribed to the Google Groups "rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/f3bba0b2-d421-466a-bf3c-9f445a85d0a6%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages