Database Management

To show the servers API curl will be used to interact with the database. The examples assume the server to be running on the some host and listening on the port 1338.

List all Databases


Create a Database

Create a Database with name 'myDb'. The empty body will let curl set the Content-Length header which Stairtower requires for PUT and POST requests

curl -X PUT -d ""

# Listing all databases should contain 'myDb'

# Listing the Documents of 'myDb' should return 
# an empty array

Delete a Database

Deletion of a whole Database is similar to removing a single Document. You simply omit the Document identifier when sending a DELETE request.

curl -X DELETE


Returns the number of Documents in the Database