Recuperar registros de App Services

OBTENER /groups/{groupId}/apps/{appId}/logs

Parámetros de path

Parámetros de query

  • co_id string

    Return only log messages associated with the given request Correlation ID.

  • errors_only booleano

    The value of this field does not matter. If included in the request, this endpoint only returns error logs (even if the value is set to false). If this field is excluded from the request, this endpoint only returns non-error logs.

  • user_id string

    Devuelve únicamente los mensajes de registro asociados con el user_id dado.

  • fecha de inicio string

    La fecha y hora en ISO 8601 en la que se deben comenzar a devolver resultados, exclusivos.

  • end_date string

    La fecha y hora en ISO 8601 en la que se dejará de devolver resultados, inclusive.

  • Omitir entero

    El número de desplazamiento de entradas de registro coincidentes que se omitirán antes de incluirlas en la respuesta.

  • limit entero

    El número máximo de entradas de registro que se incluirán en la respuesta. Si la consulta coincide con más registros, devuelve los documentos en orden ascendente por fecha hasta alcanzar el límite.

    El valor mínimo es 1, el valor máximo es 100.

  • tipo string

    El tipo de registro que le gustaría recuperar.

    Values are TRIGGER_FAILURE, TRIGGER_ERROR_HANDLER, DB_TRIGGER, AUTH_TRIGGER, SCHEDULED_TRIGGER, FUNCTION, SERVICE_FUNCTION, STREAM_FUNCTION, SERVICE_STREAM_FUNCTION, AUTH, WEBHOOK, ENDPOINT, PUSH, API, API_KEY, GRAPHQL, SYNC_CONNECTION_START, SYNC_CONNECTION_END, SYNC_SESSION_START, SYNC_SESSION_END, SYNC_CLIENT_WRITE, SYNC_ERROR, SYNC_OTHER, SCHEMA_ADDITIVE_CHANGE, SCHEMA_GENERATION, SCHEMA_VALIDATION, or LOG_FORWARDER.

Respuestas

  • 200 aplicación/json

    Recuperado exitosamente.

    Ocultar atributos de respuesta Mostrar los atributos de respuesta Objeto
    • Registros arreglo[objeto]

      Como máximo 100 resultados por solicitud.

      No más de 100 elementos.

      Uno de:
    • próxima fecha de finalización string Requerido

      The end date and time of the next page of log entries in ISO 8601 format. App Services paginates the result sets of queries that match more than 100 log entries and includes this field in paginated responses. To get the next page of up to 100 entries, pass this value as the end_date parameter in a subsequent request.

    • nextSkip entero Requerido

      The offset into the next page of log entries in ISO 8601 format. MongoDB App Services paginates the result sets of queries that match more than 100 log entries and includes this field in paginated responses where the first entry on the next page has the same timestamp as the last entry on this page. To get the next page of up to 100 entries, pass this value, if it is present, as the skip parameter in a subsequent request.

GET /groups/{groupId}/apps/{appId}/logs
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/logs' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Ejemplos de respuestas (200)
{
  "logs": [
    {
      "_id": "63922bf071bdce7b19e14e76",
      "co_id": "63922bf071bdce7b19e14e75",
      "domain_id": "60c8f69884b0a73d14bb634b",
      "app_id": "60c8f69884b0a73d14bb634a",
      "group_id": "5b2ec426970199272441a214",
      "request_url": "/api/client/v2.0/app/test-for-now-vbwlr/auth/providers/anon-user/login",
      "request_method": "POST",
      "started": "2022-12-08T18:24:48.409Z",
      "completed": "2022-12-08T18:24:48.41Z",
      "type": "API"
    }
  ],
  "nextEndDate": "string",
  "nextSkip": 42
}