Method: Auth0::Api::V2::Logs#logs
- Defined in:
- lib/auth0/api/v2/logs.rb
#logs(options = {}) ⇒ json Also known as: get_logs
Retrieves log entries that match the specified search criteria. Default: 50. Max value: 100.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/auth0/api/v2/logs.rb', line 24 def logs( = {}) request_params = { q: .fetch(:q, nil), page: .fetch(:page, nil), per_page: .fetch(:per_page, nil), sort: .fetch(:sort, nil), fields: .fetch(:fields, nil), include_fields: .fetch(:include_fields, nil), include_totals: .fetch(:include_totals, nil), from: .fetch(:from, nil), take: .fetch(:take, nil) } if request_params[:take].to_i > 100 raise Auth0::InvalidParameter, 'The total amount of entries to retrieve should be less than 100' end if request_params[:per_page].to_i > 100 raise Auth0::InvalidParameter, 'The total amount of entries per page should be less than 100' end get(logs_path, request_params) end |