Get database metadata via HTTP bug

1 view
Skip to first unread message

temp...@gmail.com

unread,
Nov 17, 2016, 8:50:59 AM11/17/16
to Stardog
Hi, i sent PUT request, to get database metadata:

PUT /admin/databases/db233/options HTTP/1.1

connection: close

accept: */*

host: localhost:5820

authorization: Basic YWRtaW46YWRtaW4=

content-length: 0


HTTP/1.1 500 There was a fatal error on the server

Content-Length: 37

Connection: close

Server: Stardog/4.2


There was a fatal error on the server


Jess Balint

unread,
Nov 17, 2016, 10:09:42 AM11/17/16
to sta...@clarkparsia.com
Have you sent a body to indicate which options you are requesting? Please try this command:

curl -v -H "Content-Type: application/json" -X PUT -u admin:admin -d '{ "database.name" : "" } ' localhost:5820/admin/databases/db233/options

Jess

--
-- --
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+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

temp...@gmail.com

unread,
Nov 18, 2016, 2:40:30 AM11/18/16
to Stardog
Sorry, I did not carefully read the documentation. I wanted to get all the meta database. I need to list all the keys?

Zachary Whitley

unread,
Nov 18, 2016, 7:22:26 AM11/18/16
to sta...@clarkparsia.com
Maybe I'm missing or the docs are off something but isn't it a little odd to be using a PUT to get metadata options and POST to set them? I would have expected a GET to get them and the PUT to set them. 


On Nov 18, 2016, at 2:40 AM, temp...@gmail.com wrote:

Sorry, I did not carefully read the documentation. I wanted to get all the meta database. I need to list all the keys?

--
-- --
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
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Michael Grove

unread,
Nov 18, 2016, 7:28:37 AM11/18/16
to stardog
On Fri, Nov 18, 2016 at 7:22 AM, Zachary Whitley <zachary...@gmail.com> wrote:
Maybe I'm missing or the docs are off something but isn't it a little odd to be using a PUT to get metadata options and POST to set them? I would have expected a GET to get them and the PUT to set them. 


Your intuition is correct. The method to use is PUT, the docs are correct, but that's unusual for getting data. The issue is that it expects a body, the options you want to get, hence the reason for PUT rather than GET.

In any case, we're going to change this to GET and provide the options as parameters in an upcoming version of Stardog.

Cheers,

Mike
 

On Nov 18, 2016, at 2:40 AM, temp...@gmail.com wrote:

Sorry, I did not carefully read the documentation. I wanted to get all the meta database. I need to list all the keys?

--
-- --
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
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.

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

Michael Grove

unread,
Nov 18, 2016, 7:29:15 AM11/18/16
to stardog
Also, to answer the original question, yes, you have to enumerate the keys of the options you want to get.
Reply all
Reply to author
Forward
0 new messages