Looking for Cloud Services or Support? Check restheart.com
RESTHeart
Virtual Threads Powered API Framework
✅ Instant REST, GraphQL and Websockets APIs for MongoDB. ✅ Declarative Security, no code required. ✅ Implement your Backend in minutes.
Ask Sophia AI about RESTHeart
Run this docker command to start (go to Setup for more installation options)
$ docker pull softinstigate/restheart && curl https://raw.githubusercontent.com/SoftInstigate/restheart/master/docker-compose.yml --output docker-compose.yml && docker compose up --attach restheart
Then check the tutorials
MongoDB REST API Tutorial MongoDB GraphQL API Tutorial Framework Tutorial Auth TutorialRESTHeart Features
RESTHeart unlocks all the features of MongoDB via REST, GraphQL and WebSocket APIs.
Also supports Mongo Atlas, FerretDB, AWS DocumentDB, and Azure Cosmos DB
RESTHeart provides a powerful and battle-tested security layer that keeps your application secure without coding.
Unlock the Power of Microservices with Ease: discover our innovative development framework that simplifies the creation of microservices in Java, Kotlin, JavaScript, or TypeScript. Our framework provides a set of simple yet robust building blocks: Service, Provider, Interceptor, and Initializer.
Focus on Your Microservice Logic, Not the Complexity. Experience the freedom to code your microservice logic without worrying about complex and time-consuming tasks. Our framework takes care of crucial aspects such as runtime process management, security, concurrency, HTTP transport protocol, request routing, logging, configuration, and data protection.
The RESTHeart runtime leverages a scalable and pooled thread-per-request concurrency model. This means that developers, including those working with JavaScript, can enjoy a streamlined development process without the complexities of asynchronous programming.
Read, write and search JSON documents with HTTP requests without coding; specify MongoDB queries and projection options; deal with large result sets with automatic pagination.
The GraphQL plugin works side by side with the REST plugin to get an unified API to build modern applications. GraphQL applications are configured through an API without coding.
The WebSocket API notifies clients of data changes in real time and supports thousands of connected clients. Data streams are configured through an API without coding.
Data API
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 one document.
Here we use the brilliant httpie, a modern command line HTTP client.
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 one document.
Here we use the immortal cURL!
Query documents with Java.
The GET request has two query parameters: filter
to apply a query and pagesize
to limit the response to one document.
Here we use the unirest java http library.
Query documents with Swift.
The GET request has two query parameters: filter
to appy a query and pagesize
to limit the response to one document.
Here we use the JSONSerialization to parse the response body.
Polyglot Framework
Implement web services in minutes.
Implement a simple interface and deploy the web service by copying its jar file into the plugins directory.
See it on GitHub More examplesImplement plugins in Kotlin.
You can use Java and Kotlin to implement plugins.
Kotlin Service exampleSnoop and modify requests at different stages of their lifecycle.
This interceptor applies to requests of the hello web service adding a timestamp to the response content.
Interceptor can be executed at different points of the request as defined
by the interceptPoint parameter of the annotation RegisterPlugin
Implement plugins in JavaScript.
This is yet another Hello World web service.
Running RESTHeart on the GraalVM allows you to deploy JavaScript Services and Interceptors.
Become a sponsor
You can support the development of RESTHeart via GitHub Sponsor program and receive public acknowledgment of your help.
Go and see available sponsor tiers