修改端点 已弃用

PUT /groups/{groupId}/apps/{appId}/endpoints/{endpointId}

修改现有的终结点配置。

路径参数

application/json

body 必需

终结点的有效、更新的配置对象

  • route 字符串 必需
  • http_method 字符串 必需

    取值为 GETPOSTPUTPATCHDELETE*

  • function_id 字符串 必需

    端点函数的唯一 ID。

  • validation_method 字符串 必需

    值为 NO_VALIDATIONSECRET_AS_QUERY_PARAMVERIFY_PAYLOAD

  • secret_id 字符串

    如果 validation_method 设置为 "SECRET_AS_QUERY_PARAM""VERIFY_PAYLOAD",则这是授权请求的密钥_id

  • return_type 字符串 必需

    数据API和自定义端点支持的数据格式。

    值为 JSONEJSON

  • respond_result 布尔 必需
  • fetch_custom_user_data 布尔
  • create_user_on_auth 布尔
  • 残疾人 布尔 必需
  • _id 字符串

    端点的唯一 ID。

响应

  • 200 application/json

    正常

    隐藏响应属性 显示响应属性 对象
    • route 字符串 必需
    • http_method 字符串 必需

      取值为 GETPOSTPUTPATCHDELETE*

    • function_id 字符串 必需

      端点函数的唯一 ID。

    • validation_method 字符串 必需

      值为 NO_VALIDATIONSECRET_AS_QUERY_PARAMVERIFY_PAYLOAD

    • secret_id 字符串

      如果 validation_method 设置为 "SECRET_AS_QUERY_PARAM""VERIFY_PAYLOAD",则这是授权请求的密钥_id

    • return_type 字符串 必需

      数据API和自定义端点支持的数据格式。

      值为 JSONEJSON

    • respond_result 布尔 必需
    • fetch_custom_user_data 布尔
    • create_user_on_auth 布尔
    • 残疾人 布尔 必需
    • _id 字符串

      端点的唯一 ID。

    • function_name 字符串
PUT /groups/{groupId}/apps/{appId}/endpoints/{endpointId}
curl \
 --request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/endpoints/{endpointId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"route":"string","http_method":"GET","function_id":"string","validation_method":"NO_VALIDATION","secret_id":"string","return_type":"JSON","respond_result":true,"fetch_custom_user_data":true,"create_user_on_auth":true,"disabled":true,"_id":"string"}'
请求示例
{
  "route": "string",
  "http_method": "GET",
  "function_id": "string",
  "validation_method": "NO_VALIDATION",
  "secret_id": "string",
  "return_type": "JSON",
  "respond_result": true,
  "fetch_custom_user_data": true,
  "create_user_on_auth": true,
  "disabled": true,
  "_id": "string"
}
响应示例 (200)
{
  "route": "string",
  "http_method": "GET",
  "function_id": "string",
  "validation_method": "NO_VALIDATION",
  "secret_id": "string",
  "return_type": "JSON",
  "respond_result": true,
  "fetch_custom_user_data": true,
  "create_user_on_auth": true,
  "disabled": true,
  "_id": "string",
  "function_name": "string"
}