Merge pull request #2823 from pjhampton/barrel

New Barrel HTTP API Cheat Sheet
master
Zaahir Moolla 2016-04-12 17:50:46 -04:00
commit bf5699086f
1 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,95 @@
{
"id": "barrel_http_cheat_sheet",
"name": "Barrel API Cheat Sheet",
"description": "An overview of the Barrel DB HTTP API",
"metadata": {
"sourceName": "Barrel",
"sourceUrl" : "https://docs.barrel-db.org/reference"
},
"template_type": "terminal",
"aliases": [
"barreldb", "barrel", "barrel api", "barreldb api"
],
"section_order": [
"Barrel Commands",
"Barrel API",
"Document API"
],
"sections": {
"Barrel Commands": [
{
"key": "barrel start",
"val": "starts a barrel instance"
},
{
"key": "barrel stop",
"val": "stops the barrel instane"
},
{
"key": "barrel console",
"val": "starts the barrel console"
}
],
"Barrel API": [
{
"key": "localhost:5984",
"val": "retrieves information about this node (GET)"
},
{
"key": "localhost:5984/_active_tasks",
"val": "retrieves the list of active tasks (GET)"
},
{
"key": "localhost:5984/_all_dbs",
"val": "retrieves the list of database names (GET)"
},
{
"key": "localhost:5984/_config",
"val": "retrieves the barrel configuration (GET)"
},
{
"key": "localhost:5984/_db_updates",
"val": "retrieves the latest database change (GET)"
},
{
"key": "localhost:5984/_log",
"val": "tails the main log file (GET)"
},
{
"key": "localhost:5984/_stats",
"val": "statistics about the current node (GET)"
},
{
"key": "localhost:5984/_uuids",
"val": "UUIDs generated by Barrel (GET)"
}
],
"Document API": [
{
"key": "localhost:5984/{db_name}",
"val": "creates a new database (POST)"
},
{
"key": "localhost:5984/{db_name}",
"val": "returns database information (GET)"
},
{
"key": "localhost:5984/{db_name}/_all_docs",
"val": "returns all the documents in the database (GET)"
},
{
"key": "localhost:5984/{db_name}/{doc_id}",
"val": "returns the document (GET)"
}
]
}
}