Questions tagged [mongodb-stitch]

For questions related to the MongoDB Stitch Service API.

Stitch allows building an API for a MongoDB back end and other integrated services by concentrating on application logic rather than detail of delivery for data manipulation code.

Documentation is available at https://docs.mongodb.com/stitch/

And there are various tutorials available: https://docs.mongodb.com/stitch/tutorials/

165 questions
0
votes
0 answers

Using Mongo Stitch with Firebase Storage?

I'm currently developing a solution that lets users create a parent listing whereby they can upload files, assign child listings to that and then search their listings based on data from both the parent and child listings. As an example, think of it…
K20GH
  • 6,032
  • 20
  • 78
  • 118
0
votes
0 answers

How to insert Documents to MongoDB stitch from client app without authentication (as admin)

i want to store users TTL(Time to live) data to DataBase even his not confirmed the email and not authenticated. So after confirmation i will set 'activated:true' and keep the user data. i'm using a Reactjs app with stitch.
0
votes
2 answers

ReactNative MongoDB default app client has not yet been initialized/set

I'm new to ReactNative, and I am trying to connect MongoDB Atlas to my RN app. I'm getting an error saying default app client has not yet been initialized/set even though I'm calling the Stitch.initializeDefaultAppClient(MONGODB_APP_CLIENT)…
shmob
  • 198
  • 2
  • 17
0
votes
1 answer

How to run MongoDB multiple queries under a transaction in Stitch?

I'm working on a react-native project which uses MongoDB as database and need to run multiple Insert & Update operations atomically. I need to run the operations under a transaction but as I use MongoDB Stitch functions for db operations and expose…
Joseph
  • 1
  • 1
0
votes
2 answers

Insert new document if a specific field value isn't found in the collection

I have a collection of items which all have serial numbers and other fields attached to them. A document looks like this { _id: ObjectId(), serialNum: "123456789", ...otherfields } I want to insert a new document but only if none of the…
juicy89
  • 448
  • 5
  • 14
0
votes
1 answer

MongoDB Atlas Trigger -- Receiving a "StitchError: HTTP request failed: unexpected status code: expected=200, actual=415" error

We're trying to create a trigger in MongoDB Atlas that will automatically reduce our Azure tier of an evening to save cost. The function we've put together (probably incorrectly!) returns an error when we try to run it. The result output is: logs:…
oo2
  • 1
  • 2
0
votes
1 answer

How to suspend a mongodb stitch trigger within a stitch function

I have a mongodb stitch database trigger that executes a stitch function on collection update. The stitch function in question will connect to amazon kinesis and transmit the database changes. I want to suspend the stitch trigger from with in the…
user119020
  • 413
  • 1
  • 3
  • 13
0
votes
1 answer

Getting transport error while watching the document in stitch

When I watch the certain ids in the collection using MongoDB watch I am getting error ERROR Error: Uncaught (in promise): e: (TRANSPORT_ERROR): the request transport encountered an error communicating with Stitch: event source failed to open and…
0
votes
0 answers

Role Permissions in MongoDb Stitch by function for insert new documents

I have a collection "data" with roles for different permission levels like Read and Update. User can only update their own documents and read some. But everybody can insert new documents. I defined the roles and created an function to check the…
0
votes
1 answer

How to write trigger and functions code in python(pymongo) for MongoDB Stitch instead of NodeJS(mongoose)

I want to setup a connection of MongoDB Stitch with my Python Script and fire trigger on database events to execute a python function. I've seen this article which shows connection with stitch of python script. I cannot find how to do this type of…
0
votes
1 answer

Mongo Stitch, trigger delete operation doesn't fire

stitch app, trigger with insert,update,delete,replace operation types enabled, all apart from "delete" fire up fine but delete doesn't. Steps to reproduce, create or use existing doc in the db, do collection.deleteOne, trigger doesn't fire. Any…
Jack0fshad0ws
  • 563
  • 1
  • 7
  • 13
0
votes
1 answer

MongoError: unknown command findAndModify

This might be a niche question since Stitch is rather new, but I'll try anyway! I have a Stitch app, with the MongoDB Connection String option enabled on the underlying Atlas cluster. When trying to run this line in my code const r = await…
Juvaly
  • 252
  • 1
  • 17
0
votes
1 answer

How to remove data type from http get service

I have created http get service that is returning collection data as json. But I don't want to show column data type This is my function code. const result = doc.find({},{id:1,desc:1,label:1,LocationTree:1,path:1,coordinates:1,_id:…
Mahesh
  • 1
  • 1
0
votes
1 answer

how mongoDB Stitch handle session at server side

I am planning to develop isomorphic app using Mongodb stitch and Next.js. So,I was doing some testing. I made login page. And i logged in user with some user name and password. It shows that user is logged in and credential are saved in local…
FaisalAhmed
  • 3,469
  • 7
  • 46
  • 76
0
votes
2 answers

[StitchServiceError: Error: ObjectId in must be a single string of 12 bytes or a string of 24 hex characters]

I am writing Mongodb Stitch, functions. The weird part is, writing it within Mongodb Stitch function client, it has to do BSON.ObjectId const games = mongodb.collection("games"); const gameId = "5cb9404ffc6da85909eb561c"; const objectId…
Yumiko
  • 448
  • 5
  • 16