Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas
Created by Guest
Created on May 7, 2020

Ability to create and update database triggers via API

It would be really usefule to have the ability to create and update database triggers via the API. Currently, updates to triggers cannot be integrated into our testing and deployment process because the only way to update them is manually through the interface.
  • Guest
    Jul 30, 2020
    I am not sure if you use node or not but in case you do, you could use following package to insert/update/delete triggers https://www.npmjs.com/package/mongodb-stitch-api-client This internall uses stitch/realm admin api.
  • Guest
    Jul 22, 2020
    @Drew Not to hijack this thread, but at least for our use case I don't think the Stitch Admin API would suit our purposes. We don't use realm/stitch apps; we just want to be able to configure triggers to operate on our clusters. I see that when we create a trigger on one of our clusters, a "Triggers_RealmApp" automatically appears in the "Realm" tab of the UI, but issuing a GET to the 'https://realm.mongodb.com/api/admin/v3.0/groups/{groupId}/apps' API endpoint as specified on https://docs.mongodb.com/realm/admin/api/v3/#get-/groups/{groupid}/apps returns an empty response.
  • Guest
    May 15, 2020
    If Triggers were supported by the Atlas API they would also then be theoretically supported by the CLI (https://docs.mongodb.com/mongocli/stable/reference/#mcli-reference). Or are there plans for the CLI to also cover Stitch?
  • Guest
    May 8, 2020
    Hi John – We expose Triggers through the Stitch Admin API, you can read a bit more about the available endpoints here – https://docs.mongodb.com/stitch/admin/api/admin-v3/#event-trigger-apis Does this meet your needs? Thanks, Drew