Created
February 2, 2012 15:09
-
-
Save aabril/1723891 to your computer and use it in GitHub Desktop.
CouchDB cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CouchDB cheatsheet via REST API | |
| HOST="http://username:password@localhost:5984" | |
| # couchdb | |
| curl -X GET $HOST | |
| # check available databases | |
| curl -X GET $HOST/_all_dbs | |
| # create a new database | |
| curl -X PUT $HOST/databasename | |
| # check a specific document | |
| curl -X GET $HOST/database/document | |
| # check a specific document, with silent output | |
| curl -sX GET $HOST/database/document | |
| # prettify the output with python json | |
| alias json="python -m json.tool" | |
| curl -sX GET $HOST/database/document | json | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment