-
Notifications
You must be signed in to change notification settings - Fork 27
boneill42 edited this page Feb 7, 2012
·
1 revision
curl -X PUT http://localhost:8080/virgil/data/playground/
curl -X PUT http://localhost:8080/virgil/data/playground/toys/
curl -X PUT http://localhost:8080/virgil/data/playground/toys/swingset -d "{\"foo\":\"1\",\"bar\":\"33\"}"
Updates columns with new values or adds columns if they don't exist.
curl -X PATCH http://localhost:8080/virgil/data/playground/toys/swingset -d "{\"foo\":\"3\",\"erg\":\"42\"}"
curl -X GET http://localhost:8080/virgil/data/playground/toys/swingset/
After running the commands above returns: {"erg":"42","foo":"3","bar":"33"}
curl -X PUT http://localhost:8080/virgil/data/playground/toys/swingset/snaf -d "lisa"
curl -X PATCH http://localhost:8080/virgil/data/playground/toys/ -d "{\"row1\":{\"column1\":\"1\"},\"row2\":{\"column1\":\"33\"}}"
curl -X DELETE http://localhost:8080/virgil/data/playground/toys/swingset/snaf
curl -X DELETE http://localhost:8080/virgil/data/playground/toys/swingset/
curl -X DELETE http://localhost:8080/virgil/data/playground/toys/
curl -X DELETE http://localhost:8080/virgil/data/playground/
To specify consistency level, just include an additional HTTP header, "X-Consistency-Level" that specifies the level of required consistency for the operation. Below is an example used on a GET.
curl -X GET -H "X-Consistency-Level:ONE" http://localhost:8080/virgil/data/playground/toys/swingset/