创建 Webhook 已弃用

发布 /groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks

创建 Webhook。

路径参数

application/json

body 必需

要创建的 Webhook。

  • 名称 字符串 必需
  • function_source 字符串 必需
  • respond_result 布尔 必需
  • 选项 对象
    隐藏选项属性 显示选项属性 对象
    • 秘密 字符串
    • secretAsQueryParam 布尔

响应

  • 201

    已成功创建。

POST /groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/services/{serviceId}/incoming_webhooks' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","function_source":"string","respond_result":true,"options":{"secret":"string","secretAsQueryParam":true}}'
请求示例
{
  "name": "string",
  "function_source": "string",
  "respond_result": true,
  "options": {
    "secret": "string",
    "secretAsQueryParam": true
  }
}