COUCHDB
Healthcheck1
# curl -s http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984/_up | jq
List all databases1
# curl -s http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984/_all_dbs | jq
Database info1
# curl -s http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984/<db> | jq
List all docs from a database1
# curl -s http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984/<db>/_all_docs | jq
Info from a doc1
# curl -s http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984/<db>/<id_doc> | jq
Restart1
# curl -s -X POST -H"Content-Type: application/json" -u $COUCHDB_USER:$COUCHDB_PASSWORD localhost:5984/_node/couchdb@<node_name>/_restart
List member of a cluster1
# curl -s http://$COUCHDB_USER:$COUCHDB_PASSWORD@localhost:5984/_membership | jq
add member1
# curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD -X PUT "http://localhost:5986/_nodes/couchdb@<node_name>" -d {}
get rev1
# curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD "http://localhost:5986/_nodes/couchdb@<node_name>"
del member1
# curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD -X DELETE "http://localhost:5986/_nodes/couchdb@<node_name>?rev=1-967a00dff5e02add41820138abb3284d"
set/unset maintenance mode1
# curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD -X PUT -H "Content-type: application/json" localhost:5984/_node/couchdb@<node_name>/_config/couchdb/maintenance_mode -d "\"false\""
Show config1
# curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD -X GET -H "Content-type: application/json" localhost:5984/_node/couchdb@<node_name>/_config/couchdb
# curl -s -u $COUCHDB_USER:$COUCHDB_PASSWORD -X GET -H "Content-type: application/json" localhost:5984/_node/couchdb@<node_name>/_config
Force db syn1
# curl -s -X POST -H"Content-Type: application/json" -u $COUCHDB_USER:$COUCHDB_PASSWORD localhost:5984/<db>/_sync_shards