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
0
votes
1 answer

Why PUT method not working to create a new collection even if ACL allow it?

I have a role with this permission: path-prefix[/mydb] and (method[PUT] or method[POST] or method[GET]) I'm trying to create a collection in this database following this doc: https://restheart.org/docs/mgmt/dbs-collections/ So, I wrote using postman…
mcardia
  • 115
  • 2
  • 10
0
votes
1 answer

RestHeart ACL - User access controls for databases

I'm using restheart 6, with mongoAclAuthorizer and mongoRealmAuthenticator. I have no problem managing users or databases, but I'm not understanding how to restrict a user to access only the databases I allow. I'm reading the documentation…
mcardia
  • 115
  • 2
  • 10
0
votes
1 answer

RESTHeart instance stops without any error

I am running 4 different RESTHeart demon instances on a single server, it is connecting to different Mongo Databases. I have given different ports for these 4 instances and have different property files. RESTHeart server stops suddenly, I do not see…
M. Anto
  • 1
  • 1
0
votes
4 answers

Mongo DB - filter only future dates

I'm making a request from Angular to a MongoDB table (accessed through RESTHeart) where each record contains a "startDate" field. When I fetch some records I get this date as an object: startDate: {$date: 1609718400000} I want to filter only future…
koswag
  • 83
  • 1
  • 1
  • 7
0
votes
1 answer

Authentication failed in restheart plugin skeleton

I'm creating a restheart plugin using the plugin skeleton but, after up docker-compose i get Authentication error 'restheart-plugin-skeleton_mongodb-initiate_1' container. Container log: MongoDB shell version v4.2.11 connecting to:…
Ed Barros
  • 3
  • 1
0
votes
1 answer

Accessing a variable field within mongoDb $match aggregation pipeline

I'm trying to dynamically filter some data via an aggregation, passing the column and the date as a parameter into the aggregation. {"$match": {"\"$$dateFilter.column\"": {"$gte": "ISODate(\"$$dateFilter.value\")"}} } And this is how I call the…
0
votes
1 answer

creating a restheart MongoInterceptor

I want to create an interceptor that takes data from the incoming request and issues a custom query to the underlying db, returning the result of that query to the user. I cannot figure out how to return the results of the custom query to the…
jim
  • 41
  • 2
0
votes
1 answer

Restheart authenticator plugin for mongoRealmAuthenticator loading at startup

On windows, I am trying to switch to the recommended Mongo Realm Authenticator as suggested in the documentation, however, when setting up my restheart.yml file exactly as shown in the documentation I receive this error on startup: "ERROR…
kbradyno
  • 3
  • 1
0
votes
1 answer

MongoDB query Points within Polygons

i am new to MongoDB with java driver.. i try to query polygons from one collection and match points in another collection. what i actually have is: //This is collection 1.. here i get my polygon definition.. the name of the element is…
Harald Wiesinger
  • 651
  • 3
  • 11
  • 23
0
votes
1 answer

RESTHeart Error When Trying To Load CSV Data

I try to load csv data by using: given(). contentType("text/csv"). body("num,name,val\n1,dror,x\n2,amir,y"). when(). log (). all (). post("csv?db=restheart&coll=poi&id=0"). then().log().ifError() I get status 400: "message": "Content-Type request…
0
votes
1 answer

400 Bad Request

I am getting 400 Bad Request when trying this : List list = new ArrayList(); Object[] mongodata = restTemplate.getForObject(mongourl,Object[].class,fileName); list =…
Thira
  • 81
  • 1
  • 9
0
votes
1 answer

How to handle no data found when calling restTemplate.getForObject

I am calling restTemplate.getForObject to retrieve a certain value from Mongo DB. How to deal the exception if the expected data is not found in the DB? Object[] mongodata = restTemplate.getForObject(resulturl,Object[].class,keyval); list =…
Thira
  • 81
  • 1
  • 9
0
votes
2 answers

Unable to start RestHeart Security

I am unable to start Restheart Security. Anyone knows what might be wrong? I am in the dark. I get the following error [main] [1;31mERROR[0;39m org.restheart.security.Bootstrapper - Error starting RESTHeart Security.…
Wannes
  • 1
  • 1
0
votes
1 answer

Restheart aggregations: send dynamic $match query using $var

Can i send JSON in avars to dynamically create $match filter query as shown below: { "type": "pipeline", "uri": "myaggr", "stages": [{ "$match": {"$var":"n"} }......} I have to pass JSON in…
0
votes
2 answers

RestHeart Response without metadata

How can I get a RestHeart response without metadata when I query a collection? (like "_embedded", "_id", "_returned") Example: https://restheart.url/test { "_embedded": [ { "_id": "5c530d6381e931ba5992ea35", "isActive": true, …
Miguel Santos
  • 344
  • 3
  • 9