路径参数
-
Atlas 项目/组 ID。
-
您的应用程序的 ObjectID。App Services API 项目和应用程序 ID 部分演示了如何查找此值。
查询参数
-
执行函数的用户。需要
user_id
或run_as_system
。您不能同时指定两者。 -
确定是否以系统用户身份运行。需要
run_as_system
或user_id
。不能同时指定两者。
POST /groups/{groupId}/apps/{appId}/debug/execute_function
curl \
--request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/debug/execute_function?user_id=string&run_as_system=true' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"service":"string","name":"string","arguments":["string"]}'
请求示例
{
"service": "string",
"name": "string",
"arguments": [
"string"
]
}
响应示例 (200)
{
"error": {},
"result": {},
"stats": {
"execution_time": "string"
}
}