You are here

public function ResourceServers::getAll in Auth0 Single Sign On 8.2

Get all Resource Servers, by page if desired. Required scope: "read:resource_servers"

@link https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource...

Parameters

null|integer $page Page number to get, zero-based.:

null|integer $per_page Number of results to get, null to return the default number.:

Return value

mixed

Throws

\Exception Thrown by the HTTP client when there is a problem with the API call.

File

vendor/auth0/auth0-php/src/API/Management/ResourceServers.php, line 28

Class

ResourceServers
Class ResourceServers. Handles requests to the Resource Servers endpoint of the v2 Management API.

Namespace

Auth0\SDK\API\Management

Code

public function getAll($page = null, $per_page = null) {
  $params = [];

  // Pagination parameters.
  if (null !== $page) {
    $params['page'] = abs((int) $page);
  }
  if (null !== $per_page) {
    $params['per_page'] = abs((int) $per_page);
  }
  return $this->apiClient
    ->method('get')
    ->withDictParams($params)
    ->addPath('resource-servers')
    ->call();
}