RESTHEART
NoCoding and NoSQL Platform
for MongoDB

REST microservice for MongoDB Ready-to-use, no server-side coding Supports all features of MongoDB Data API for Mobile Apps Develop REST Web Services Publish Content to the Web Handle users and permissions Available as binary package and Docker image Put data access under control Stream real-time data with WebSockets Integrate with MongoDB Notify clients with Hooks Create Open Data solutions Threat protection at every layer

For developers with deadlines.
Latest version
RESTHeart 4.1
Join us on our weekly Happy Hour video chat about RESTHeart.
More info

Trusted by Startups and Corporations

Fully Supported

Our dedicated support connects you with the engineers that develop RESTHeart to seamlessly run production environments. RESTHeart OSS is supported by our active community on public channels like github and stackoverflow.

SUPPORT

RESTHeart OSS and RESTHeart Platform

RESTHeart OSS is distributed under the Open Source GNU AGPL v3 license. RESTHeart Platform is shipped with additional enterprise grade features under a business-friendly commercial license.

EDITIONS

Use Cases

REST API for MongoDB

RESTHeart unlocks all the features of MongoDb.
CRUD operations, Queries, GridFs, Aggregations and many more are accessible via a simple REST API.
No server-side development is required so you can focus on building your Application as all the database logic is available out of the box.
RESTHeart also provides strong a Security layer for Authentication and Authorization.

Content Management

RESTHeart allows to effectively manage content, such as images, comments, tags, categories, geolocalized data, audios and videos, via a solid REST API.
RESTHeart is the perfect API provider for the JAMstack.
You can build Single Page Applications much effectively with Angular, React, Vue frameworks and Mobile Apps on iOS or Android because you can focus on creating beautiful User Interfaces for your users.

Integration

RESTHeart is an effective solution for Integration needs.
You can easily and effectively involve MongoDB in your Integration Processes because your Middleware can interact with the RESTHeart API using simple HTTP Connectors.
RESTHeart plugins allow you implement additional Web Services and transform data to best fullfil your integration needs.
RESTHeart Security puts all interactions under control and allows to define role based access policies on data.

Open Data and IoT

RESTHeart is a perfect fit for Open Data and Internet of Things applications. Data can be uploaded to RESTHeart via JSON calls or CSV files and made immediately available through the REST API.
RESTHeart also leverages MongoDb's Geospatial support and stores GeoJSON objects without the need to write complicated server-side code: geometries are then available to clients such as Google Maps via its API.
RESTHeart also handles the GTFS format for public transportation schedules thanks to a commercial plugin.

Runs anywhere

Query documents from the command line with httpie.

The GET request has two query parameters: filter to apply a query and pagesize to limit the response to two documents.
Here we use the brilliant httpie, a modern command line HTTP client.

More examples
$ http GET https://beta.mrest.io/demo/messages?filter='{"from":"Bob"}'\&pagesize=2 key:demo

HTTP/1.1 200 OK
# other response headers omitted

[
    {
        "_id": {
            "$oid": "5c50963e477870eb8258fa68"
        }, 
        "from": "Bob", 
        "message": "was here", 
        "timestamp": {
            "$date": 1548785214114
        }
    }, 
    {
        "_id": {
            "$oid": "5c50962f477870eb8258fa54"
        }, 
        "from": "Bob", 
        "message": "RESTHeart rocks", 
        "timestamp": {
            "$date": 1548785199983
        }
    }
]

Query documents from the command line with cURL.

The GET request has two query parameters: filter to apply a query (that needs to be encoded with --data-urlencode option since it contains the curly brackets) and pagesize to limit the response to two documents.
Here we use the immortal cURL!

More examples
    
$ curl --header "key:demo" -G --data-urlencode 'filter={"from":"Bob"}' https://beta.mrest.io/demo/messages?pagesize=2

[
    {
        "_id": {
            "$oid": "5c50963e477870eb8258fa68"
        }, 
        "from": "Bob", 
        "message": "was here", 
        "timestamp": {
            "$date": 1548785214114
        }
    }, 
    {
        "_id": {
            "$oid": "5c50962f477870eb8258fa54"
        }, 
        "from": "Bob", 
        "message": "RESTHeart rocks", 
        "timestamp": {
            "$date": 1548785199983
        }
    }
]

Query documents with JavaScript.

The GET request has two query parameters: filter to apply a query and pagesize to limit the response to two documents.
Here we use the fetch API.

Run it
const url = encodeURI('https://beta.mrest.io/demo/messages?filter={"from":"Bob"}&pagesize=2');

fetch(url, { headers: {'key':'demo'} })
  .then(response => response.json())
  .then(function(data) {
    console.log(JSON.stringify(data));
});

Query documents with Java.

The GET request has two query parameters: filter to apply a query and pagesize to limit the response to two documents.
Here we use the unirest java http library.

More examples
public void printOutMessages() throws UnirestException {
    HttpResponse<JsonNode> resp = Unirest.get("https://beta.mrest.io/demo/messages")
            .header("key", "demo")
            .queryString("filter", "{\"from\":\"Bob\"}")
            .queryString("pagesize", "2")
            .asJson();

    // get body as JSON array 
    JSONArray messages = resp.getBody().getArray();

    // print out each message
    messages.forEach(message -> System.out.println(message.toString()));
}

Query documents with Swift.

The GET request has two query parameters: filter to appy a query and pagesize to limit the response to two documents.
Here we use the JSONSerialization to parse the response body.

More examples
import UIKit
import PlaygroundSupport

var urlComponents = URLComponents(string: "https://beta.mrest.io/demo/messages")

// set the query parameters
var queryItems = [URLQueryItem]()
queryItems.append(URLQueryItem(name: "pagesize", value: "2"))
queryItems.append(URLQueryItem(name: "filter", value: "{\"from\":\"Bob\"}"))
urlComponents?.queryItems = queryItems

var urlRequest = URLRequest(url: (urlComponents?.url)!)

// set the key request header
urlRequest.setValue("demo", forHTTPHeaderField: "key")

// set request method
urlRequest.httpMethod = "GET"

URLSession.shared.dataTask(with: urlRequest) { (data, response, error) in
    guard let dataResponse = data, error == nil
    else {
        print(error?.localizedDescription ?? "Response Error")
        return
    }
    
    do {
        let jsonResponse = try JSONSerialization.jsonObject(with: dataResponse, options: [])
        print(jsonResponse)
    } catch let jsonError {
        print(jsonError)
    }
}.resume()

// only needed in playground
PlaygroundPage.current.needsIndefiniteExecution = true

Examples use mrest.io cloud service for RESTHeart that requires the api key.

Widely Adopted

RESTHeart Docker image's pulls