{
"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 <<EOF\n{\"name\":\"testCollectionBasics\"}\nEOF\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionBasics\n\n{ \n \"id\" : \"1518281781\", \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 <<EOF\n{\"name\":\"testCollectionEdges\",\"type\":3}\nEOF\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionEdges\n\n{ \n \"id\" : \"1518412853\", \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 <<EOF\n{\"name\":\"testCollectionUsers\",\"keyOptions\":{\"type\":\"autoincrement\",\"increment\":5,\"allowUserKeys\":true}}\nEOF\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionUsers\n\n{ \n \"id\" : \"1518674997\", \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 --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\" : \"2040885\", \n \"name\" : \"_graphs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"19801141\", \n \"name\" : \"_system_users_users\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"2434101\", \n \"name\" : \"_cluster_kickstarter_plans\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"205877\", \n \"name\" : \"_users\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"21046325\", \n \"name\" : \"collectable_foxx_data_firstCollection\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"4531253\", \n \"name\" : \"_statisticsRaw\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"2303029\", \n \"name\" : \"_routing\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"6300725\", \n \"name\" : \"_jobs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"7152693\", \n \"name\" : \"_apps\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"4924469\", \n \"name\" : \"_statistics\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"20915253\", \n \"name\" : \"tescht_todos\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"5317685\", \n \"name\" : \"_statistics15\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"19080245\", \n \"name\" : \"_sessions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"4400181\", \n \"name\" : \"_aqlfunctions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"2171957\", \n \"name\" : \"_modules\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"6169653\", \n \"name\" : \"_queues\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"5710901\", \n \"name\" : \"_configuration\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"1244603445\", \n \"name\" : \"animals\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"1243685941\", \n \"name\" : \"demo\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n } \n ], \n \"names\" : { \n \"_graphs\" : { \n \"id\" : \"2040885\", \n \"name\" : \"_graphs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_system_users_users\" : { \n \"id\" : \"19801141\", \n \"name\" : \"_system_users_users\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_cluster_kickstarter_plans\" : { \n \"id\" : \"2434101\", \n \"name\" : \"_cluster_kickstarter_plans\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_users\" : { \n \"id\" : \"205877\", \n \"name\" : \"_users\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"collectable_foxx_data_firstCollection\" : { \n \"id\" : \"21046325\", \n \"name\" : \"collectable_foxx_data_firstCollection\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_statisticsRaw\" : { \n \"id\" : \"4531253\", \n \"name\" : \"_statisticsRaw\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_routing\" : { \n \"id\" : \"2303029\", \n \"name\" : \"_routing\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_jobs\" : { \n \"id\" : \"6300725\", \n \"name\" : \"_jobs\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_apps\" : { \n \"id\" : \"7152693\", \n \"name\" : \"_apps\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_statistics\" : { \n \"id\" : \"4924469\", \n \"name\" : \"_statistics\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"tescht_todos\" : { \n \"id\" : \"20915253\", \n \"name\" : \"tescht_todos\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_statistics15\" : { \n \"id\" : \"5317685\", \n \"name\" : \"_statistics15\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_sessions\" : { \n \"id\" : \"19080245\", \n \"name\" : \"_sessions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_aqlfunctions\" : { \n \"id\" : \"4400181\", \n \"name\" : \"_aqlfunctions\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_modules\" : { \n \"id\" : \"2171957\", \n \"name\" : \"_modules\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_queues\" : { \n \"id\" : \"6169653\", \n \"name\" : \"_queues\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_configuration\" : { \n \"id\" : \"5710901\", \n \"name\" : \"_configuration\", \n \"isSystem\" : true, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"animals\" : { \n \"id\" : \"1244603445\", \n \"name\" : \"animals\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"demo\" : { \n \"id\" : \"1243685941\", \n \"name\" : \"demo\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --dump - http://localhost:8529/_api/collection/1518871605/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\" : \"1518871605\", \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 --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\" : \"1519068213\", \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 --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\" : \"1519264821\", \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 --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\" : \"1543119925\", \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\" : 0, \n \"size\" : 0 \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\" : 0, \n \"size\" : 0 \n }, \n \"attributes\" : { \n \"count\" : 0, \n \"size\" : 0 \n }, \n \"indexes\" : { \n \"count\" : 1, \n \"size\" : 2008 \n }, \n \"lastTick\" : \"1543513141\", \n \"uncollectedLogfileEntries\" : 1 \n }, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --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\" : \"1544037429\", \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 --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\" : \"1544299573\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"checksum\" : 59147579, \n \"revision\" : \"1544627253\", \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl --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\" : \"1544889397\", \n \"name\" : \"products\", \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"checksum\" : 70156406, \n \"revision\" : \"1545217077\", \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\" : \"1545479221\", \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\" : \"1545741365\", \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\" : \"1545937973\", \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 <<EOF\n{ \n \"waitForSync\" : true \n}\nEOF\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"1546200117\", \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 <<EOF\n{ \n \"name\" : \"newname\" \n}\nEOF\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"1546462261\", \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 <<EOF\n{ \n}\nEOF\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 <<EOF\n{ \n}\nEOF\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 --dump - http://localhost:8529/_api/collection/1547707445\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"1547707445\", \n \"error\" : false, \n \"code\" : 200 \n}\n
shell> curl -X DELETE --dump - http://localhost:8529/_api/collection/products1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"1547904053\", \n \"error\" : false, \n \"code\" : 200 \n}\n