获取 /groups/{groupId}/apps/{appId}/event_subscriptions

获取所有事件订阅。

路径参数

查询参数

  • 类型 字符串

    要返回的事件订阅类型。

    • DATABASE:返回数据库触发器
    • AUTHENTICATION:返回身份验证触发器
    • SCHEDULED:返回定时触发器
    • SYNCTRANSLATOR: Return Device Sync translators

    取值为 DATABASEAUTHENTICATIONSCHEDULEDSYNCTRANSLATOR

响应

  • 200 application/json

    成功。

    对变更事件流的订阅。

    以下之一:
GET /groups/{groupId}/apps/{appId}/event_subscriptions
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/event_subscriptions' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
响应示例 (200)
[
  {
    "name": "onNewEmployee",
    "type": "DATABASE",
    "config": {
      "match": {},
      "project": {},
      "database": "HR",
      "collection": "employees",
      "service_id": "5adeb649b8b998486770ae7c",
      "full_document": true,
      "operation_types": [
        "INSERT"
      ]
    },
    "function_id": "5eea9ca4ca0e356e2c2a148a",
    "event_processors": {
      "FUNCTION": {
        "config": {
          "function_id": "6841b8d3e71dc81bed89dbba",
          "function_name": "Atlas_Triggers_DatabaseInsert_1749137618"
        }
      }
    }
  }
]