triggers

Update a trigger

Changed on

Modify an existing trigger in your application.

put/groups/{groupId}/apps/{appId}/triggers/{triggerId}

Request

  • Base URL
    https://services.cloud.mongodb.com/api/admin/v3.0
  • URL
    https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/triggers/{triggerId}
  • Auth
    HTTP bearer

Request body

OR
OR

Example request

{
  "name": "onNewEmployee",
  "type": "DATABASE",
  "function_id": "5eea9ca4ca0e356e2c2a148a",
  "config": {
    "operation_types": [
      "INSERT"
    ],
    "database": "HR",
    "collection": "employees",
    "service_id": "5adeb649b8b998486770ae7c",
    "match": {},
    "project": {},
    "full_document": true
  },
  "event_processors": {
    "FUNCTION": {
      "config": {
        "function_id": "6841b8d3e71dc81bed89dbba",
        "function_name": "Atlas_Triggers_DatabaseInsert_1749137618"
      }
    }
  }
}

Response

Successfully updated the trigger.

Changes

    • breaking

      the request property //////////// became required

    • breaking

      the request property //////////// became required

    • breaking

      the request property //////////// became required

    • breaking

      removed the enum value DELETE of the request property ///////////

    • breaking

      removed the enum value INSERT of the request property ///////////

    • breaking

      removed the enum value REPLACE of the request property ///////////

    • breaking

      removed the enum value UPDATE of the request property ///////////

    • info

      the request property ////////// became optional

    • info

      the request property ////////// became optional

    • info

      the request property ////////// became optional

    • info

      the request property ////////// became optional

    • info

      the request property ////////// became optional

    • info

      the request property ////////// became optional

    • info

      the request property default value false was added