LogsManager

management. LogsManager

LogsManager Represents the relationship between Auth0 and an Identity provider.

Constructor

new LogsManager(options)

Source:
Parameters:
Name Type Description
options Object

The client options.

Name Type Attributes Description
baseUrl String

The URL of the API.

headers Object <optional>

Headers to be included in all requests.

retry Object <optional>

Retry Policy Config

Members

(inner) auth0RestClient :external:RestClient

Provides an abstraction layer for performing CRUD operations on Auth0 Logs.

Source:
Type:

(inner) clientOptions :Object

Options object for the Rest Client instance.

Source:
Type:
  • Object

Methods

get(params, cbopt) → {Promise|undefined}

Get an Auth0 log.

Source:
Parameters:
Name Type Attributes Description
params Object

Log parameters.

Name Type Description
id String

Log ID.

cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example
management.logs.get({ id: EVENT_ID }, function (err, log) {
  if (err) {
    // Handle error.
  }

  console.log(log);
});

getAll(paramsopt, cbopt) → {Promise|undefined}

Get all logs.

Source:
Parameters:
Name Type Attributes Description
params Object <optional>

Logs params.

Name Type Attributes Description
q String <optional>

Search Criteria using Query String Syntax

page Number <optional>

Page number. Zero based

per_page Number <optional>

The amount of entries per page

sort String <optional>

The field to use for sorting.

fields String <optional>

A comma separated list of fields to include or exclude

include_fields Boolean <optional>

true if the fields specified are to be included in the result, false otherwise.

include_totals Boolean <optional>

true if a query summary must be included in the result, false otherwise. Default false

cb function <optional>

Callback function.

Returns:
Type:
Promise | undefined
Example

This method takes an optional object as first argument that may be used to specify pagination settings and the search query. If pagination options are not present, the first page of a limited number of results will be returned.

// Pagination settings.
var params = {
  per_page: 10,
  page: 2
};

management.logs.getAll(params, function (err, logs) {
  console.log(logs.length);
});