Questions tagged [restheart]

RESTHeart is a RESTful gateway for access to MongoDB.

RESTHeart connects to MongoDB and opens data to the Web via a simple RESTful API.

The json based API supports CRUD and data model operations, Basic or JWT authentication, role-based authorization and CORS.

RESTHeart can be extended with custom security implementations, request transformers, checkers and hooks.

108 questions
1
vote
1 answer

Aggregation mongodb - Search field and value from sub-object in object

I want to filter out a field with the values. I have made an aggregation with the RESTHeart API. I want to know if the status is accepted or rejected. The data: { "body": { "VERIFIED_MESSAGE": { "072ade7d42d871d4fe": { …
R6ch1RD
  • 13
  • 4
1
vote
1 answer

RestHeart aggregation

I am trying to learn to use restHeart rest api and see if I can avoid any custom code to write any java code to query MongoDB. I am trying to execute below mongoshell query, any idea how should it be written in RestHeart…
athenatechie
  • 699
  • 2
  • 8
  • 15
1
vote
2 answers

Restheart Aggregation Framework - Optional Avars?

We have an aggregation query in RestHeart which works well. In the match section, we allow users to specify a specific document Id, to return just that document: "_$match" : { "_id" : { …
Tom Kerswill
  • 421
  • 6
  • 10
1
vote
0 answers

Distinct list of values from embedded document in mongodb

I'm going crazy... I come from the sql world an this is my first real experience with mongodb. I have a given json/object structure (I know, this is not perfect but it has to be so because of existing data and other applications), stored in a…
1
vote
1 answer

restheart 2 - Aggregation error

We have an aggregation operation that worked in restheart 1.1.0 but now it doesn't in 2.0.2. We have been using variables in the aggregation operation in order to handle dynamic code generation. Below is a simple example. Is there a workaround…
1
vote
1 answer

Get latest value from mongoDB via RESTHeart for freeboard

Im sending temperature data with timestamp into MongoDB. My document structure looks like this: { "_id": ObjectId("57c974d705578f617f5491e3"), "temperature" : 24, "timestamp" : "9/2/2016, 2:47:19 PM", "_msgid" :…
Michal Janošec
  • 71
  • 1
  • 10
1
vote
1 answer

RESTHeart issus with If-Match

Since my RESTHeart is internal so I wrote a gateway with php. The code for updateing the document are like this.. function mongodb_PATCH($url,$data){ //my internal RESTHeart server curl = curl_init("http://192.168.137.1:8080$url"); …
j113203
  • 11
  • 3
1
vote
1 answer

HttpClient delete with RestHeart

I have a problem on using RestHeart. I want to delete a specific document in MongoDB server and I confirmed the below command works fine in command prompt. http delete localhost:8080/mytest/users/56dda76daeb32b0860d909e1…
1
vote
1 answer

How to trigger a restheart filter?

I am building a website, using angularJs and mongoDB with restheart, to build a database. My input is written in this way,
pill45
  • 599
  • 3
  • 8
  • 23
1
vote
1 answer

Restheart get collection count()

How can i call this mongo-shell command: db.coll.count() using restheart? I tried this: http GET 127.0.0.1:8080/cloneGame/players/_count but got 403 Forbidden Error. Is there something wrong with my authentification? Thank you :)
f.b.
  • 490
  • 1
  • 5
  • 17
1
vote
1 answer

Kerberos authentication for restheart mongo client server

How to pass in kerberos token for authentication to kerborized mongo cluster through restheart? Should I do some custom implementation? FYI Kerberos Authentication works fine when I use native mongo client in java/scala. Thanks In Advance
smadhava
  • 63
  • 7
1
vote
2 answers

Aggregate method using Restheart

I have a remote database on MongoDB and i want to execute an aggregate method for grouping entries w.r.t. a certain field using restheart. My query looks like this db.musa.aggregate([{$group:{_id:"$username"}}]) this query returns a list of unique…
Arsalan Ahmed
  • 383
  • 2
  • 3
  • 14
1
vote
1 answer

Issues Angular Restangular save and update operations

I decided to take my project in the Restangular, but I have some problems in the SAVE and UPDATE operations. I use the API restheart with mongodb. In SAVE in my case, I'm saving a New Post, and when by chance I make any changes, it saves a new post…
Marco Riesco
  • 401
  • 1
  • 6
  • 17
0
votes
1 answer

Flutter restheart oid mapping

Using flutter dio and retrofit I run into problems with a restheart API. How does one properly map the mongodb oid? I've got a main.dart like this: import 'dart:convert'; import 'package:dio/dio.dart'; import 'dart:developer'; import…
pauel
  • 908
  • 10
  • 26
0
votes
0 answers

Using Aggregations in RestHeart

I am trying to use the aggregations feature in RestHeart which is described here: https://restheart.org/docs/aggregations/ I am using it to filter and group stuff in my collection based on a input variable, like…
Tobag
  • 170
  • 1
  • 10