Execute a function
Execute a function for testing.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
Query parameters
-
The user as which to execute the function. Either
user_id
orrun_as_system
is required. You cannot specify both. -
Determine whether or not to run as system user. Either
run_as_system
oruser_id
is required. You cannot specify both.
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"]}'
Request examples
{
"service": "string",
"name": "string",
"arguments": [
"string"
]
}
Response examples (200)
{
"error": {},
"result": {},
"stats": {
"execution_time": "string"
}
}