Class: PEClient::Resource::RBACV2::Users

Inherits:
Base
  • Object
show all
Defined in:
lib/pe_client/resources/rbac.v2/users.rb

Overview

With role-based access control (RBAC), you can manage local users and remote users (created on a directory service). Use the users endpoints to get lists of users, create local users, and delete, revoke, and reinstate users in PE.

Constant Summary collapse

BASE_PATH =

The base path for RBAC API v2 Users endpoints.

"#{RBACV2::BASE_PATH}/users".freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PEClient::Resource::Base

Instance Method Details

#get(offset: nil, limit: nil, order: nil, order_by: nil, filter: nil, include_roles: nil) ⇒ Hash

Fetches all users, both local and remote (including the superuser) with options for filtering and sorting response content.

Parameters:

  • offset (Integer) (defaults to: nil)

    Specify a zero-indexed integer to retrieve user records starting from the offset point. The default is 0. This parameter is useful for omitting initial, irrelevant results, such as test data.

  • limit (Integer) (defaults to: nil)

    Specify a positive integer to limit the number of user records returned. The default is 500 records.

  • order (String) (defaults to: nil)

    Specify, as a string, whether records are returned in ascending (asc) or descending (desc) order. The default is “asc”. The order_by parameter specifies the basis for sorting.

  • order_by (String) (defaults to: nil)

    Specify, as a string, what information to use to sort the records. Choose from “login”, “email”, “display_name”, “last_login”, “id”, or “creation_date”. The default is “id”.

  • filter (String) (defaults to: nil)

    Specify a case-insensitive partial string. This parameter queries the email, display_name, and login fields. For example, “example.com” searches for users with example.com in any of those three fields.

  • include_roles (Boolean) (defaults to: nil)

    Specify whether you want the response to include role information. The default is false.

Returns:

  • (Hash)


50
51
52
# File 'lib/pe_client/resources/rbac.v2/users.rb', line 50

def get(offset: nil, limit: nil, order: nil, order_by: nil, filter: nil, include_roles: nil)
  @client.get BASE_PATH, params: {offset:, limit:, order:, order_by:, filter:, include_roles:}.compact
end