public function Connections::getAll in Auth0 Single Sign On 8.2
Get all Connections by page. Required scope: "read:connections"
@link https://auth0.com/docs/api/management/v2#!/Connections/get_connections
Parameters
null|string $strategy Connection strategy to retrieve.:
null|string|array $fields Fields to include or exclude from the result.:
- Including only the fields required can speed up API calls significantly.
- Arrays will be converted to comma-separated strings.
null|boolean $include_fields True to include $fields, false to exclude $fields.:
null|integer $page Page number to get, zero-based.:
null|integer $per_page Number of results to get, null to return the default number.:
array $add_params Additional API parameters, over-written by function params.:
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/ Connections.php, line 32
Class
- Connections
- Class Connections. Handles requests to the Connections endpoint of the v2 Management API.
Namespace
Auth0\SDK\API\ManagementCode
public function getAll($strategy = null, $fields = null, $include_fields = null, $page = null, $per_page = null, array $add_params = []) {
// Set additional parameters first so they are over-written by function parameters.
$params = is_array($add_params) ? $add_params : [];
// Connection strategy to filter results by.
if (!empty($strategy)) {
$params['strategy'] = $strategy;
}
// Results fields.
if (!empty($fields)) {
$params['fields'] = is_array($fields) ? implode(',', $fields) : $fields;
if (null !== $include_fields) {
$params['include_fields'] = $include_fields;
}
}
// Pagination.
if (null !== $page) {
$params['page'] = abs((int) $page);
if (null !== $per_page) {
$params['per_page'] = $per_page;
}
}
return $this->apiClient
->method('get')
->addPath('connections')
->withDictParams($params)
->call();
}