You are here

class Logs in Auth0 Single Sign On 8.2

Class Logs. Access to the v2 Management API Logs endpoint.

@package Auth0\SDK\API\Management

Hierarchy

Expanded class hierarchy of Logs

1 file declares its use of Logs
Management.php in vendor/auth0/auth0-php/src/API/Management.php

File

vendor/auth0/auth0-php/src/API/Management/Logs.php, line 11

Namespace

Auth0\SDK\API\Management
View source
class Logs extends GenericResource {

  /**
   * Get a single Log event.
   * Required scope: "read:logs"
   *
   * @param string $log_id Log entry ID to get.
   *
   * @return mixed
   *
   * @throws \Exception Thrown by Guzzle for API errors.
   *
   * @link https://auth0.com/docs/api/management/v2#!/Logs/get_logs_by_id
   */
  public function get($log_id) {
    return $this->apiClient
      ->method('get')
      ->addPath('logs', $log_id)
      ->call();
  }

  /**
   * Retrieves log entries that match the specified search criteria (or list all entries if no criteria is used).
   * Required scope: "read:logs"
   *
   * @param array $params Log search parameters to send:
   *      - Including a restricted "fields" parameter can speed up API calls significantly.
   *      - Results are paged by default; pass a "page" and "per_page" param to adjust what results are shown.
   *
   * @return mixed
   *
   * @throws \Exception Thrown by Guzzle for API errors.
   *
   * @link https://auth0.com/docs/api/management/v2#!/Logs/get_logs
   */
  public function search(array $params = []) {
    return $this->apiClient
      ->method('get')
      ->addPath('logs')
      ->withDictParams($params)
      ->call();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GenericResource::$apiClient protected property Injected ApiClient instance to use.
GenericResource::checkEmptyOrInvalidString protected function Check that a variable is a string and is not empty.
GenericResource::checkInvalidPermissions protected function Check for invalid permissions with an array of permissions.
GenericResource::getApiClient public function Get the injected ApiClient instance.
GenericResource::normalizeIncludeTotals protected function Normalize include_totals parameter.
GenericResource::normalizePagination protected function Normalize pagination parameters.
GenericResource::__construct public function GenericResource constructor.
Logs::get public function Get a single Log event. Required scope: "read:logs"
Logs::search public function Retrieves log entries that match the specified search criteria (or list all entries if no criteria is used). Required scope: "read:logs"