Sparql Update over HTTP

0 views
Skip to first unread message

Ryan

unread,
Nov 29, 2013, 1:51:18 PM11/29/13
to sta...@clarkparsia.com
I'm just about finished up integration of Stardog into a legacy codebase.  Because we use Maven for our builds (and I didn't have time to figure out how to put the proper jars into my company's nexus), I went with using the HTTP route (instead of SNARL or Sesame).  The only unit test I have failing exercises our Sparql Update calls, including insert, delete, insert data, and delete data.  Can those be issued against the REST interface for Stardog?  If so, what's the endpoint?

Mike Grove

unread,
Dec 2, 2013, 7:13:15 AM12/2/13
to stardog
On Fri, Nov 29, 2013 at 1:51 PM, Ryan <ryan...@gmail.com> wrote:
I'm just about finished up integration of Stardog into a legacy codebase.  Because we use Maven for our builds (and I didn't have time to figure out how to put the proper jars into my company's nexus), I went with using the HTTP route (instead of SNARL or Sesame).  The only unit test I have failing exercises our Sparql Update calls, including insert, delete, insert data, and delete data.  Can those be issued against the REST interface for Stardog?  If so, what's the endpoint?

Yes, it's just /{db}/update rather than /{db}/query.

Cheers,

Mike 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Ryan

unread,
Dec 2, 2013, 7:34:28 AM12/2/13
to sta...@clarkparsia.com
Thanks Mike - I think that might have gotten missed in the online docs. 
So as far as details go, I'm doing this without a transaction, right?  And it'd be a POST to /{db}/update with no 'Content-Type' set?  What would the 'Accept' header be? 

- Ryan

Mike Grove

unread,
Dec 2, 2013, 8:19:43 AM12/2/13
to stardog
On Mon, Dec 2, 2013 at 7:34 AM, Ryan <ryan...@gmail.com> wrote:
Thanks Mike - I think that might have gotten missed in the online docs. 
So as far as details go, I'm doing this without a transaction, right? 

Yes/No.  You cannot send an update to an existing transaction, but all updates are done within their own transaction which is managed on the fly when the query comes in.  So update queries are atomic but cannot be a part of some other transaction.
 
And it'd be a POST to /{db}/update with no 'Content-Type' set? 

Should be either application/x-www-form-urlencoded or application/sparql-update. 

 
What would the 'Accept' header be? 

You can leave it blank, or use text/boolean.  We send back true/false on whether or not it worked, which I think will almost always be true as most error conditions are transmitted via other HTTP statuses.

Cheers,

Mike
Reply all
Reply to author
Forward
0 new messages