client.users.list
A method of the Users endpoint.
- list(*, feature_flag: str = None, account_status: str = None, query: str = None, group_id: int = None, group_ids: List[int] = None, organization_id: int = None, exclude_groups: bool = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse
List users
API URL:
GET /usersimport civis client = civis.APIClient() response = client.users.list(...)
- Parameters:
- feature_flagstr, optional
Return users that have a feature flag enabled.
- account_statusstr, optional
The account status by which to filter users. May be one of “active”, “inactive”, or “all”. Defaults to active.
- querystr, optional
Return users who match the given query, based on name, user, email, and id.
- group_idint, optional
The ID of the group by which to filter users. Cannot be present if group_ids is.
- group_idsList[int], optional
The IDs of the groups by which to filter users. Cannot be present if group_id is.
- organization_idint, optional
The ID of the organization by which to filter users.
- exclude_groupsbool, optional
Whether or to exclude users’ groups. Default: false.
- limitint, optional
Number of results to return. Defaults to 20. Maximum allowed is 10000.
- page_numint, optional
Page number of the results to return. Defaults to the first page, 1.
- orderstr, optional
The field on which to order the result set. Defaults to name. Must be one of: name, user.
- order_dirstr, optional
Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.
- iteratorbool, optional
If True, return a generator (specifically, a
civis.PaginatedResponseobject) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.PaginatedResponse- idint
The ID of this user.
- userstr
The username of this user.
- namestr
The name of this user.
- emailstr
The email of this user.
- activebool
Whether this user account is active or deactivated.
- primary_group_idint
The ID of the primary group of this user.
- groupsList[
civis.Response] An array of all the groups this user is in.
- idint
The ID of this group.
- namestr
The name of this group.
- slugstr
The slug of this group.
- organization_idint
The ID of the organization associated with this group.
- organization_namestr
The name of the organization associated with this group.
- groupsList[
- created_atstr (date-time)
The date and time when the user was created.
- current_sign_in_atstr (date-time)
The date and time when the user’s current session began.
- updated_atstr (date-time)
The date and time when the user was last updated.
- last_seen_atstr (date-time)
The date and time when the user last visited Platform.
- suspendedbool
Whether the user is suspended due to inactivity.
- created_by_idint
The ID of the user who created this user.
- last_updated_by_idint
The ID of the user who last updated this user.