{
"basePath": "/",
"swaggerVersion": "1.1",
"apiVersion": "0.1",
"apis": [
{
"operations": [
{
"errorResponses": [],
"parameters": [
{
"dataType": "Json",
"paramType": "body",
"required": "true",
"name": "body",
"description": "the body with name and options for a collection.
"
}
],
"notes": "Creates an new collection with a given name. The request must contain an object with the following attributes.
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionBasics\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionBasics\n\n{ \n \"id\" : \"890305704\", \n \"name\" : \"testCollectionBasics\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\nshell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionEdges\",\"type\":3}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionEdges\n\n{ \n \"id\" : \"890436776\", \n \"name\" : \"testCollectionEdges\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionUsers\",\"keyOptions\":{\"type\":\"autoincrement\",\"increment\":5,\"allowUserKeys\":true}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionUsers\n\n{ \n \"id\" : \"890698920\", \n \"name\" : \"testCollectionUsers\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"collections\" : [ \n { \n \"id\" : \"883162280\", \n \"name\" : \"frenchHighway\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n { \n \"id\" : \"4848808\", \n \"name\" : \"_statisticsRaw\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"2620584\", \n \"name\" : \"_routing\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"798620840\", \n \"name\" : \"Company\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"5242024\", \n \"name\" : \"_statistics\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"859503784\", \n \"name\" : \"relation\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n { \n \"id\" : \"888405160\", \n \"name\" : \"animals\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"799014056\", \n \"name\" : \"has_bought\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n { \n \"id\" : \"5635240\", \n \"name\" : \"_statistics15\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"887487656\", \n \"name\" : \"demo\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"883031208\", \n \"name\" : \"frenchCity\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"4717736\", \n \"name\" : \"_aqlfunctions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"2489512\", \n \"name\" : \"_modules\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"6487208\", \n \"name\" : \"_jobs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"4258984\", \n \"name\" : \"_aal\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"699333800\", \n \"name\" : \"better-example\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"798489768\", \n \"name\" : \"friend_of\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n { \n \"id\" : \"195752\", \n \"name\" : \"_configuration\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"859372712\", \n \"name\" : \"male\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"798882984\", \n \"name\" : \"Electronics\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"882900136\", \n \"name\" : \"germanHighway\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n { \n \"id\" : \"2358440\", \n \"name\" : \"_graphs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"6356136\", \n \"name\" : \"_queues\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"26803368\", \n \"name\" : \"_sessions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"798358696\", \n \"name\" : \"Customer\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"883293352\", \n \"name\" : \"internationalHighway\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n { \n \"id\" : \"2751656\", \n \"name\" : \"_cluster_kickstarter_plans\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"859241640\", \n \"name\" : \"female\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"798751912\", \n \"name\" : \"Groceries\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"882769064\", \n \"name\" : \"germanCity\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"457896\", \n \"name\" : \"_users\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n } \n ], \n \"names\" : { \n \"frenchHighway\" : { \n \"id\" : \"883162280\", \n \"name\" : \"frenchHighway\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n \"_statisticsRaw\" : { \n \"id\" : \"4848808\", \n \"name\" : \"_statisticsRaw\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_routing\" : { \n \"id\" : \"2620584\", \n \"name\" : \"_routing\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"Company\" : { \n \"id\" : \"798620840\", \n \"name\" : \"Company\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_statistics\" : { \n \"id\" : \"5242024\", \n \"name\" : \"_statistics\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"relation\" : { \n \"id\" : \"859503784\", \n \"name\" : \"relation\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n \"animals\" : { \n \"id\" : \"888405160\", \n \"name\" : \"animals\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"has_bought\" : { \n \"id\" : \"799014056\", \n \"name\" : \"has_bought\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n \"_statistics15\" : { \n \"id\" : \"5635240\", \n \"name\" : \"_statistics15\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"demo\" : { \n \"id\" : \"887487656\", \n \"name\" : \"demo\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"frenchCity\" : { \n \"id\" : \"883031208\", \n \"name\" : \"frenchCity\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_aqlfunctions\" : { \n \"id\" : \"4717736\", \n \"name\" : \"_aqlfunctions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_modules\" : { \n \"id\" : \"2489512\", \n \"name\" : \"_modules\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_jobs\" : { \n \"id\" : \"6487208\", \n \"name\" : \"_jobs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_aal\" : { \n \"id\" : \"4258984\", \n \"name\" : \"_aal\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"better-example\" : { \n \"id\" : \"699333800\", \n \"name\" : \"better-example\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"friend_of\" : { \n \"id\" : \"798489768\", \n \"name\" : \"friend_of\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n \"_configuration\" : { \n \"id\" : \"195752\", \n \"name\" : \"_configuration\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"male\" : { \n \"id\" : \"859372712\", \n \"name\" : \"male\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"Electronics\" : { \n \"id\" : \"798882984\", \n \"name\" : \"Electronics\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"germanHighway\" : { \n \"id\" : \"882900136\", \n \"name\" : \"germanHighway\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n \"_graphs\" : { \n \"id\" : \"2358440\", \n \"name\" : \"_graphs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_queues\" : { \n \"id\" : \"6356136\", \n \"name\" : \"_queues\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_sessions\" : { \n \"id\" : \"26803368\", \n \"name\" : \"_sessions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"Customer\" : { \n \"id\" : \"798358696\", \n \"name\" : \"Customer\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"internationalHighway\" : { \n \"id\" : \"883293352\", \n \"name\" : \"internationalHighway\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3 \n }, \n \"_cluster_kickstarter_plans\" : { \n \"id\" : \"2751656\", \n \"name\" : \"_cluster_kickstarter_plans\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"female\" : { \n \"id\" : \"859241640\", \n \"name\" : \"female\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"Groceries\" : { \n \"id\" : \"798751912\", \n \"name\" : \"Groceries\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"germanCity\" : { \n \"id\" : \"882769064\", \n \"name\" : \"germanCity\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_users\" : { \n \"id\" : \"457896\", \n \"name\" : \"_users\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/890895528/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/properties\n\n{ \n \"id\" : \"890895528\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"doCompact\" : true, \n \"isVolatile\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/properties\n\n{ \n \"id\" : \"891092136\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"doCompact\" : true, \n \"isVolatile\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/count\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/count\n\n{ \n \"id\" : \"891288744\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"doCompact\" : true, \n \"isVolatile\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"count\" : 100, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/figures\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/figures\n\n{ \n \"id\" : \"911539368\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"doCompact\" : true, \n \"isVolatile\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : false, \n \"count\" : 1, \n \"figures\" : { \n \"alive\" : { \n \"count\" : 1, \n \"size\" : 88 \n }, \n \"dead\" : { \n \"count\" : 0, \n \"size\" : 0, \n \"deletion\" : 0 \n }, \n \"datafiles\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"journals\" : { \n \"count\" : 1, \n \"fileSize\" : 1048576 \n }, \n \"compactors\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"shapefiles\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"shapes\" : { \n \"count\" : 1, \n \"size\" : 104 \n }, \n \"attributes\" : { \n \"count\" : 1, \n \"size\" : 48 \n }, \n \"indexes\" : { \n \"count\" : 1, \n \"size\" : 2008 \n }, \n \"lastTick\" : \"911932584\", \n \"uncollectedLogfileEntries\" : 0 \n }, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/revision\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"912915624\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"revision\" : \"0\", \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/checksum\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"913177768\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"checksum\" : 912174629, \n \"revision\" : \"913505448\", \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/checksum?withRevisions=false&withData=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"913767592\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"checksum\" : 375414976, \n \"revision\" : \"914095272\", \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --dump - http://localhost:8529/_api/collection/products/load\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"914357416\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"count\" : 0, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --dump - http://localhost:8529/_api/collection/products/unload\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"914619560\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 4, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --dump - http://localhost:8529/_api/collection/products/truncate\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"914816168\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/properties\n{ \n \"waitForSync\" : true \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"915209384\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"doCompact\" : true, \n \"isVolatile\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products1/rename\n{ \n \"name\" : \"newname\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"915471528\", \n \"name\" : \"newname\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/rotate\n{ \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/rotate\n{ \n}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1105, \n \"errorMessage\" : \"could not rotate journal: no journal\" \n}\n
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/collection/916847784\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"916847784\", \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/collection/products1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"917044392\", \n \"error\" : false, \n \"code\" : 200 \n}\n