publicación /groups/{groupId}/apps/{appId}/debug/execute_function

Execute a function for testing.

Parámetros de path

Parámetros de query

  • user_id string Requerido

    The user as which to execute the function. Either user_id or run_as_system is required. You cannot specify both.

  • run_as_system booleano Requerido

    Determine whether or not to run as system user. Either run_as_system or user_id is required. You cannot specify both.

aplicación/json

Cuerpo Requerido

The function to execute.

  • service string

    The service to use when calling this function.

  • Nombre string Requerido

    The name of the function you want to run.

  • arguments array[string]

    Cualquier argumento que requiera tu función.

Respuestas

  • 200 aplicación/json

    Ejecutado con éxito.

    Ocultar atributos de respuesta Mostrar los atributos de respuesta Objeto
    • Error Objeto
    • Resultado Objeto
    • stats Objeto
      Ocultar atributo de estadísticas Show stats attribute Objeto
      • execution_time string
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"]}'
Solicitar ejemplos
{
  "service": "string",
  "name": "string",
  "arguments": [
    "string"
  ]
}
Ejemplos de respuestas (200)
{
  "error": {},
  "result": {},
  "stats": {
    "execution_time": "string"
  }
}