The Web API for MongoDB

Build applications faster, zero coding required!

Quickstart

Supported by an active Community and Professional Services

Available under the Open Source AGPL and the Commercial License

 
  OSS PRO ENTERPRISE
Audience Hobbyists Small Business Med–Large Companies
License AGPL v3
Commercial
No Custom Terms
Commercial
with Custom Terms, price may vary depending on your legal requirements
OEM
You must distribute your product under the AGPL and disclose source code to users interacting via network
Possible
Requires a license key per instance
Available as Custom Term
Redistribute your closed-source product embedding RESTHeart in high volumes
Clustering n/a Unsupported
Available and supported
Configure highly available clusters connected to MongoDB Replica Sets and Shards
IP Warranty n/a n/a
Available as Custom Term
Optional Remediation Warranty for IP claims
Liability Insurance n/a n/a
Available as Custom Term
Optional protection for Direct Liability
Updates n/a
First year included.
Extended by renewing the yearly subscription.
Priority Bug Fixing n/a
First year included.
Extended by renewing the yearly subscription.
Professional Services n/a
Consulting and training package, directly from RESTHeart's developers.
Pricing Free
$950/year per instance
No limits on development and test instances
Volume discounts available
Starting at $9500 for first instance and $4750 for additional instances
No limits on development and test instances
Prices may vary depending on custom terms
Volume discounts available
Purchasing n/a Online with Credit Card Offer/Purchase Order Process Handling
    Buy Online Get in touch

MongoDB

RESTHeart is the leading Web API for MongoDB.

Just run it to open your MongoDb to the Web.

The API unlocks all the features of MongoDb, including queries, bulk updates, GridFs, aggregations, replica sets, sharding and more...

Fast Dev

No server side development is required and you can focus on building you application.

For complex cases, a simple and modern framework allows extending the API.

RESTHeart provides out-of-the-box User Authentication and Authorization

The Docker Container is available to get it up and running in minutes.

Fast & Light

High throughput check the performance tests.

Lightweight ~15Mb footprint, low RAM usage, starts instantly.

Horizontally Scalable with Stateless Architecture and full support for MongoDB replica sets and shards.

µService: it does one thing and it does it well.

Prod

High quality Documentation and active development Community.

Professional Services are available from SoftInstigate, the company behind RESTHeart.

For the Enterprise, the Commercial License overcomes the conditions of the AGPL.

Query documents from the command line with httpie.

The GET request has two query parameters: the query filter 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": "5b90101a198370e1dd7d0110"
        },
        "from": "Bob",
        "message": "was here",
        "timestamp": {
            "$date": 1536167962446
        }
    },
    {
        "_id": {
            "$oid": "5b49be10d418da78b75c3c2c"
        },
        "from": "Bob",
        "message": "RESTHeart rocks",
        "timestamp": {
            "$date": 1531559440350
        }
    }
]

Query documents from the command line with cURL.

The GET request has two query parameters: the query filter (that needs to be encoded with --data-urlencode option since it contains the curly brackets special chars) 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": "5b90101a198370e1dd7d0110"
        },
        "message": "was here",
        "from": "Bob",
        "timestamp": {
            "$date": 1536167962446
        }
    },
    {
        "_id": {
            "$oid": "5b49be10d418da78b75c3c2c"
        },
        "message": "RESTHeart rocks",
        "from": "Bob",
        "timestamp": {
            "$date": 1531559440350
        }
    }
]

Query documents with JavaScript.

The GET request has two query parameters: the query filter 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: the query filter 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: the query filter 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

Please note that the examples use the mrest.io cloud service for RESTHeart. It requires the api key and has a slightly different representation format. See Representation Format for more information.

SUPPORTED BY AN ACTIVE COMMUNITY AND PROFESSIONAL SERVICES

Professional Services help you on using the RESTHeart standard API, developing RESTHeart extensions, customizing RESTHeart, priority bug fixing, configuration, best practices, etc...

PROFESSIONAL SERVICES

AVAILABLE UNDER THE OPEN SOURCE AGPL AND THE COMMERCIAL LICENSE

RESTHeart is distributed under the Open Source GNU AGPL v3. If use of our product under the AGPL v3 does not satisfy your organization’s legal department, a commercial licenses is available.

Commercial license

Widely Adopted

RESTHeart's Docker image pulls