Skip to content

Instantly share code, notes, and snippets.

@aabril
Created February 2, 2012 15:09
Show Gist options
  • Select an option

  • Save aabril/1723891 to your computer and use it in GitHub Desktop.

Select an option

Save aabril/1723891 to your computer and use it in GitHub Desktop.
CouchDB cheatsheet
# 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