Posting/putting data to fluiddb

6 views
Skip to first unread message

yosun

unread,
Apr 16, 2011, 8:57:20 PM4/16/11
to FluidDB Discuss
I can't seem to understand how to submit data to fluiddb... I've tried
put and post for tags... I've tried creating namespaces, and then
creating tags. Neither works. Is there a general workflow for
submitting (various types of) data to fluiddb?

Nicholas Tollervey

unread,
Apr 17, 2011, 5:19:27 AM4/17/11
to fluiddb...@googlegroups.com
Hi Yosun,

Sorry to hear you've been having problems. I can't spend a huge amount
of time right now explaining how to get stuff working since I've got
family commitments today. However, I can give you some quick pointers
that might be of some help (see below).

In any case, I'm more than happy to answer any questions and if you're
still having problems will answer more fully when I've got a bit of
time this evening (UK time).

You don't mention how you're trying to interact with Fluidinfo. Can I
assume you're using a client library..? If so, which one..? Also, it'd
be helpful if you could paste some examples of what you've been doing
along with a description of what you expected to happen and what
actually happened (or not). This is useful for us because it shows us
where there are weaknesses in our documentation or where the usage of
the client library might not be *that* intuitive.

Fluidinfo really is very simple and if you're having problems then
it's *our* problem (we're not explaining things clearly enough) rather
than yours.

Anyway, here are the promised pointers:

The RESTful API itself is described in painful detail here:

http://api.fluidinfo.com/

There are several walk-throughs on our blog.

The following is a little out of date but still works:

http://blogs.fluidinfo.com/fluidinfo/2011/01/14/exploring-fluiddb-with-fluiddb-py/

And this one about the BoingBoing data-set includes lots of examples:

http://blogs.fluidinfo.com/fluidinfo/2011/02/09/baby-steps-with-the-boingboing-api/

Both of the above are using the fluidinfo.py module (formerly known as
fluiddb.py). I use this simply because it's a relatively thin wrapper
above the RESTful API so it's obvious what's going on under-the-hood.
There are lots of other client libraries listed on our website here:

http://fluidinfo.com/developers

Also, you can join us in the #fluidinfo channel on Freenode IRC. If
you don't have a native client the following link will open up a
web-based client into the chat room:

http://webchat.freenode.net/?channels=fluidinfo&uio=d4

We're a friendly bunch, just ask and we'll try to help as best we can.

If you're still having problems let me know. Like I said, I'm more
than happy to help.

In fact... I think Monday will involve me updating the website with a
walk-through tutorial with basic "getting started" steps.

Best of luck!

Nicholas.

Nicholas Tollervey

unread,
Apr 17, 2011, 5:24:12 AM4/17/11
to fluiddb...@googlegroups.com
I forgot to mention...

The way to PUT data into Fluidinfo is described here:

http://api.fluidinfo.com/html/api.html#about_PUT

and here:

http://api.fluidinfo.com/html/api.html#objects_PUT

Common gotchas include not providing correct values for the
content-type or content-length headers.

You basically PUT a value (the body of the request) to an endpoint
referencing either the object's about value or object ID followed by
the path of the tag you're using:

http://fluiddb.fluidinfo.com/about/AnObjectsAboutValue/path/to/tag

or

http://fluiddb.fluidinfo.com/objects/AnObjectsUUID/path/to/tag

Hope this helps,

Nicholas.

On 17 April 2011 01:57, yosun <yos...@gmail.com> wrote:

Nick Radcliffe

unread,
Apr 17, 2011, 6:04:41 AM4/17/11
to fluiddb...@googlegroups.com

Without more information it's very hard to guess, but I suppose one
obvious thing is that with writing data you need to send the username/
password information, which you don't to read public data.

I'm guessing you're doing this directly through HTTP without a library
or whatever, but you might want to start by using a client library or
app. and then try to replicate it through direct use of the API.

With fdb.py (https://github.com/njr0/fdb.py), once you've set
installed and set up your credentials (username on the first line,
password on the second line in a file called ~/.fluidDBcredential, on
Unix-like systems), there should be nothing to do except a command like

python fdb.py tag -a "Eiffel Tower" rating=9

to rate the object with the about tag "Eiffel Tower" with a yosun/
rating of 9. (fdb creates tags, namespaces etc. for you.) (You can
test it's working correctly with

python fdb.py test

Nick

Reply all
Reply to author
Forward
0 new messages