Usage documentation

for the JDB Node-container using jhttp and the jwebapp jdb-frontend


Current node rules

The URI contains the path to the content and takes 1 parameter
Example: /folder/8291/test.png?a=insert

Insert

curl -H "content-type: binary" --data-binary @/tmp/some.content -i "URL/folder/8291/test.png?a=insert"


Return codes

HTTP/1.1 200 OK
HTTP/1.1 201 Exists
HTTP/1.1 500 Error


Update

curl -H "content-type: binary" --data-binary @/tmp/some.content -i "URL/folder/8291/test.png?a=update"

Return codes

HTTP/1.1 200 Updated
HTTP/1.1 404 Not found
HTTP/1.1 500 Error

Replace

curl -H "content-type: binary" --data-binary @/tmp/some.content -i "URL/folder/8291/test.png?a=replace"


Return codes

HTTP/1.1 200 Inserted
HTTP/1.1 201 Replaced
HTTP/1.1 500 Error


Delete

curl -i "URL/folder/8291/test.png?a=delete"


Return codes

HTTP/1.1 200 Deleted
HTTP/1.1 404 Not found
HTTP/1.1 403 Parent node does not exist

Select, end-node


curl -i "URL/folder/8291/test.png"

The body contains the content un-encoded.


Return codes

HTTP/1.1 200 OK
HTTP/1.1 404 Not found


Select, a node with children


curl -i "URL/folder/8291"

HTTP/1.1 200 OK
Content-type: application/json


{
"test": {
 "1": "some.content"
 , "123": "some.more.content" }
}

Warning: If you stored terrabytes of data in the nodes you will get terrabytes of JSON-encoded data in the response.


Iterate


curl -i "URL/folder/8291/tes?a=iterate"

Body will contain all nodes in 8291 starting with the key name tes