Clone wiki

ubud-db / Home

Welcome to Ubud

Welcome to Ubud! Ubud is a document store on AppEngine with a REST-JSON API.

Try Ubud

You can try Ubud right now, using your favorite browser or a simple REST client.


to load your first Ubud document. Username is 'admin' and password is 'topsecret'.


CRUD operations

The REST url to Ubud is built using this formatting:{namespace}/{kind}[/{id}]

CRUD is mapped to the following HTTP methods:

  • POST without {id} to Create a document, the generated id is returned in the response Contents.
  • GET with {id} to Read a document
  • POST with {id} or _id to Update a document
  • DELETE with {id} to Delete a document

Create Example

Content-Type: application/json

   "message":"Hello Ubud world!",

can be posted using the simple wget command:

echo -e {\"message\":\"Hello Ubud world\!\",\"alt\":42} > echo1.json
wget --quiet --user=admin --password=topsecret \\
     --post-file=echo1.json --header=Content-Type:application/json \\

will give you the generated id in front of the prompt on next line, e.g.

5{color:green}os@ola-T400-mint{color} {color:cyan}/tmp ${color}

which indicates an id with value '5'.

Query Example


will give you

[{"_id":5,"alt":42,"message":"Hello Ubud world!"}]

Adding the query param single=1 returns the unique document or null:


will give you

{"_id":5,"alt":42,"message":"Hello Ubud world!"}