Operation on Database
1、create a database
curl -X PUT
2、get all dbs
curl -X GET
3、Delete a database
curl -X DELETE
Operation On Document
1、create a ducoment
curl -X PUT /johndoe -d '{"firstName":"Joe","lastName":"Lennon","email":"joe@joelennon.ie"}'
2、get a ducoment
curl -X GET /johndoe
3、delete a document
curl -X DELETE
/johndoe?rev=1-1-967a00dff5e02add41819138abb3284d
4、copy a ducoment to another id
curl -X COPY /joelennon -H "Destination: johnsmith"
5、update a document
curl -X PUT /johnsmith -d '{"_rev":"1-
4152282996","firstName":"John","lastName":"Smith","email":["johnsmith@example.com","jsmith@e
xample.com"],"phone":"(555) 555-5555"}'
阅读(1166) | 评论(0) | 转发(0) |