From the command line
Use curl or httpie to play with our demo instance.
See below for a step by step tutorial.
Using the HAL browser
RESTHeart uses the Hypertext Application Language json representation format and embeds the HAL browser.
Go and play with it on our demo instance at
Looking the Notes example web application
You can preview the notes web application at dbapi.io/notes.
The code is available on github.
The application is described in the documentation.
Angular 2 Example
Try it from the command line
The demo database exposes a collection at
http://dbapi.io/db/coll without requiring authentication. Access to any other MongoDB resource is forbidden.
This demo instance is reset on regular basis, so feel free to play with it but don’t rely on it for persistent storage of your data.
Insert or update the document with _id docid
Get the created document
Create a second document with
If the _id is not specified in the request body, it will be autogenerated as a new ObjectId. The
Location response header specifies the URL of the new document.
Update the first document with
This request uses the dot notation and the
$currentDate operator. These are available in all write requests!
Get the updated document again.
The returned representation contains all the document properties plus few more. The
_etag is updated automatically by RESTHeart for Web caching and ghost writes management.
Find documents via query.
filter query parameter allows to specify any MongoDB query.
The matching documents are in the
Get documents as an array (without the collection properties).
np query parameter allows to get rid of the collection properties.
In this case, the response body is just an array of documents.
np stands for No Properties