{ "basePath": "/", "swaggerVersion": "1.1", "apiVersion": "0.1", "apis": [ { "operations": [ { "errorResponses": [ { "reason": "is returned if the list of database was compiled successfully. ", "code": "200" }, { "reason": "is returned if the request is invalid. ", "code": "400" }, { "reason": "is returned if the request was not executed in the _system database. ", "code": "403" }, { "reason": "is returned if the database could not be found. ", "code": "404" } ], "parameters": [], "notes": "Retrieves a list of all existing databases

Note: retrieving the list of databases is only possible from within the _system database.

", "summary": "retrieves a list of all existing databases", "httpMethod": "GET", "examples": "

unix> curl --dump - http://localhost:8529/_api/database\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    \"_system\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "retrievesAListOfAllExistingDatabases" } ], "path": "/_api/database" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the information was retrieved successfully. ", "code": "200" }, { "reason": "is returned if the request is invalid. ", "code": "400" }, { "reason": "is returned if the database could not be found. ", "code": "404" } ], "parameters": [], "notes": "Retrieves information about the current database

The response is a JSON object with the following attributes:

- name: the name of the current database

- id: the id of the current database

- path: the filesystem path of the current database

- isSystem: whether or not the current database is the _system database

", "summary": "retrieves information about the current database", "httpMethod": "GET", "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.6003/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "retrievesInformationAboutTheCurrentDatabase" } ], "path": "/_api/database/current" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the database was created successfully. ", "code": "200" }, { "reason": "is returned if the request parameters are invalid or if a database with the specified name already exists. ", "code": "400" }, { "reason": "is returned if the request was not executed in the _system database. ", "code": "403" } ], "parameters": [ { "dataType": "Json", "paramType": "body", "required": "true", "name": "body", "description": "the body with the name of the database. " } ], "notes": "Creates a new database

The request body must be a JSON object with the attribute name. name must contain a valid the manual.

The response is a JSON object with the attribute result set to true.

Note: creating a new database is only possible from within the _system database.

", "summary": "creates a new database", "httpMethod": "POST", "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/database\n{\"name\":\"example\"}\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\n

", "nickname": "createsANewDatabase" } ], "path": "/_api/database" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the database was dropped successfully. ", "code": "200" }, { "reason": "is returned if the request is malformed. ", "code": "400" }, { "reason": "is returned if the request was not executed in the _system database. ", "code": "403" }, { "reason": "is returned if the database could not be found. ", "code": "404" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "database-name", "description": "The name of the database " } ], "notes": "Deletes the database along with all data stored in it.

Note: dropping a database is only possible from within the _system database. The _system database itself cannot be dropped.

", "summary": "drops an existing database", "httpMethod": "DELETE", "examples": "

unix> curl -X DELETE --dump - http://localhost:8529/_api/database/example\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\n

", "nickname": "dropsAnExistingDatabase" } ], "path": "/_api/database/{database-name}" } ] }