HTTP POST Request Returning error 400 code: QEIVR2

I have tried to add data to graphs in stardog over HTTP using post requests, but I get the 'INVALID_RDF' error every time. I think that I am getting confused about how to construct the body of the request since the explanation at SPARQL 1.1 Graph Store HTTP Protocol isn't super clear to me - it seems to be saying that we need to place the same RDF payload in the body twice?

It is also unclear to me if the prefix definitions are also meant to be included in the RDF payload or if the payload should consist only of the data/triples. My error response is:
body: {"message":"Expected '<' or '_', found: P [L1]","code":"QEIVR2"}
So it seems to not like the 'PREFIX' start to the body.

I am still new to stardog and any help would be appreciated!

Hi Loz,

If you're having issues with the SPARQL HTTP protocol, Stardog also has its own HTTP API which is documented here: API Reference | ReDoc

Best,
Clark

Additionally, if you are using Java, Python, or Javascript, we make clients for those languages so you do not have to write the requests by hand. You can find details on all of these on this page: Programming with Stardog | Stardog Documentation Latest

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.