HTTP REST versioning commit endpoint

0 views
Skip to first unread message

Conrad Leonard

unread,
Nov 24, 2014, 9:33:41 PM11/24/14
to sta...@clarkparsia.com
Hi,
After reading the docs http://docs.stardog.com/http/ and playing around for a while I'm still unable to make a vcs commit using the HTTP API.
In the following, versioning.enabled is true.

Here's what I'm doing:
1. start a new transaction by POSTing to /{db}/transaction/begin
2. add some data by POSTing to /{db}/{txid}/add
3. try to commit the data by POSTing to /{db}/vcs/{txid}/commit
Result of step 3 is that I get a 404 
HTTP/1.1 404 /testdb/vcs/f08ed40a-c544-4c00-9519-06d3c131165f/commit was not found

Is the transaction id returned by {db}/transaction/begin not usable at the vcs/{txid}/commit endpoint? If not, what is the transaction id that should be used there? 

Additional info: If I just finish the transaction in the usual way by POST to /{db}/transaction/commit, I see via CLI "vcs list" that a new version has actually been created by the committed transaction, but the UUID identifying it is not the same as the one that was returned to me from  /{db}/transaction/begin. 

In summary I'm really in the dark here, any pointers would be much appreciated.

Mike Grove

unread,
Nov 25, 2014, 7:09:40 AM11/25/14
to stardog
On Mon, Nov 24, 2014 at 9:33 PM, Conrad Leonard <conrad....@hotmail.com> wrote:
Hi,
After reading the docs http://docs.stardog.com/http/ and playing around for a while I'm still unable to make a vcs commit using the HTTP API.
In the following, versioning.enabled is true.

Here's what I'm doing:
1. start a new transaction by POSTing to /{db}/transaction/begin
2. add some data by POSTing to /{db}/{txid}/add
3. try to commit the data by POSTing to /{db}/vcs/{txid}/commit
Result of step 3 is that I get a 404 
HTTP/1.1 404 /testdb/vcs/f08ed40a-c544-4c00-9519-06d3c131165f/commit was not found

Is the transaction id returned by {db}/transaction/begin not usable at the vcs/{txid}/commit endpoint? If not, what is the transaction id that should be used there? 

You have the right idea, you're just using documentation which contains a typo =)

It should be "commit_msg" not "commit" as the final token in the path.  I corrected it in the HTML docs and in the apiary version.

Thanks for catching this.

Cheers,

Mike
 

Additional info: If I just finish the transaction in the usual way by POST to /{db}/transaction/commit, I see via CLI "vcs list" that a new version has actually been created by the committed transaction, but the UUID identifying it is not the same as the one that was returned to me from  /{db}/transaction/begin. 

In summary I'm really in the dark here, any pointers would be much appreciated.

--
-- --
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

Conrad Leonard

unread,
Nov 25, 2014, 7:53:56 AM11/25/14
to sta...@clarkparsia.com
Great, working now.
Thanks!


Date: Tue, 25 Nov 2014 07:09:39 -0500
Subject: Re: [stardog-users] HTTP REST versioning commit endpoint
From: mi...@clarkparsia.com
To: sta...@clarkparsia.com
Reply all
Reply to author
Forward
0 new messages