triggers

Update a trigger

Modify an existing trigger in your application.

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

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

Changed in 6 of the 50 revisions of this API.910

    • the request property allOf[TriggerConstructor]/oneOf[AuthenticationTrigger]/allOf[BaseTrigger]/event_processors became required

      request-property-became-required

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[BaseTrigger]/event_processors became required

      request-property-became-required

    • the request property allOf[TriggerConstructor]/oneOf[ScheduledTrigger]/allOf[BaseTrigger]/event_processors became required

      request-property-became-required

  • v351a885fea9ae47See the full diff
    • removed the enum value DELETE of the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/operation_types/items/

      request-property-enum-value-removed

    • removed the enum value INSERT of the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/operation_types/items/

      request-property-enum-value-removed

    • removed the enum value REPLACE of the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/operation_types/items/

      request-property-enum-value-removed

    • removed the enum value UPDATE of the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/operation_types/items/

      request-property-enum-value-removed

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/collection became optional

      request-property-became-optional

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/database became optional

      request-property-became-optional

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/full_document became optional

      request-property-became-optional

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/full_document_before_change became optional

      request-property-became-optional

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/match became optional

      request-property-became-optional

    • the request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/config/unordered became optional

      request-property-became-optional

    • the unordered request property default value false was added

      request-property-default-value-added

    • added the new optional request property allOf[TriggerConstructor]/oneOf[DatabaseTrigger]/allOf[subschema #2]/error_handler

      new-optional-request-property

    • added TriggerConstructor subschema #1 to the request body allOf list

      request-body-all-of-added

    • removed DatabaseTrigger AuthenticationTrigger ScheduledTrigger from the request body oneOf list

      request-body-one-of-removed

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property oneOf[DatabaseTrigger]/allOf[subschema #2]/config/maximum_throughput

      new-optional-request-property

    • added the new optional request property oneOf[DatabaseTrigger]/allOf[subschema #2]/config/project

      new-optional-request-property