如下:
Create Keyspace (playground)
curl -X PUT http://localhost:8080/virgil/data/playground/
Create Column Family (toys)
curl -X PUT http://localhost:8080/virgil/data/playground/toys/
Set a Row (rowkey = "swingset", columns [ foo:1, bar:22 ])
curl -X PUT http://localhost:8080/virgil/data/playground/toys/swingset -d "{\"foo\":\"1\",\"bar\":\"33\"}"
Update a Row (rowkey = "swingset", columns [ foo:1, bar:22 ])
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\"}"
Fetch Row (rowkey = "swingset")
curl -X GET http://localhost:8080/virgil/data/playground/toys/swingset/
Insert Column (rowkey = "swingset", columns [ snaf:lisa ])
curl -X PUT http://localhost:8080/virgil/data/playground/toys/swingset/snaf -d "lisa"
Delete Column (rowkey = "swingset")
curl -X DELETE http://localhost:8080/virgil/data/playground/toys/swingset/snaf
Delete Row
curl -X DELETE http://localhost:8080/virgil/data/playground/toys/swingset/
Delete Column Family
curl -X DELETE http://localhost:8080/virgil/data/playground/toys/
Delete Keyspace
curl -X DELETE http://localhost:8080/virgil/data/playground/
[该贴被banq于2013-11-27 14:48修改过]