The REST API Server for MongoDB

Build applications faster, zero coding required!

Quickstart Source code

Use Cases

REST API for MongoDB

RESTHeart unlocks all the features of MongoDb via HTTP. Queries, Bulk Updates, GridFs, Aggregations, Map-reduce functions, Replica Sets, Shards, Indexing and many more are accessible via a simple RESTful API.

No server-side development is required so you can focus on building your Web or Mobile apps, as all the mandatory database logic is available out of the box.

RESTHeart also provides strong API & Web Security models for User Authentication, Authorization and Caching.

Content Management

RESTHeart allows to effectively manage and aggregate content and its metadata, such as images, comments, tags, categories, geolocalized data, audios and videos, delivering it via a solid REST API.

Single Page Applications with Angular, React or Vue and iOS or Android Mobile applications can be built much faster, because you can focus on the User Interface.

RESTHeart is a perfect API provider for JAMstack Web architectures, where it fits much more naturally that any WordPress customisation.

Geospatial Data

RESTHeart extends MongoDb's Geospatial support. It stores GeoJSON objects without the need to write complicated server-side code.

You can design geometries (points, lines, polygons) and make them available to Google Maps clients via API: a perfect fit for Open Data solutions.

RESTHeart handles the GTFS format for public transportation schedules and associated geographic information. Geospatial data can then be uploaded to RESTHeart via JSON or CVS files.

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

Trusted by Startups and Corporations

 

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": "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: 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": "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: 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.

Licenses

  AGPL v3 PRO ENTERPRISE
Audience Hobbyists / developers Small Business Med–Large Companies
License Open source
Commercial
No Custom Terms
Commercial
with Custom Terms, price may vary depending on your legal requirements
OEM
Distribute your product under the AGPL: the source code of any modified version, also running on public network servers, must be distributed.
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.
The maintenance can be extended by renewing at $600 per instance per year.
First year included.
The maintenance can be extended by renewing the licenses at 80% of total licenses cost per year.
Priority Bug Fixing n/a
Professional Services n/a
Consulting and training package, directly from RESTHeart's developers.
Pricing Free
$950 per instance
VAT applies for EU based customers
No limits on development instances
Volume discounts available
Starting at $9500 for first instance and $4750 for additional instances
VAT applies for EU based customers
No limits on development 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

Widely Adopted

RESTHeart Docker image's pulls