Fetch_users function

almapiwrapper.users.fetch_users(q: str, zone: str, env: Optional[Literal['P', 'S']] = 'P') List[User]

Search users in IZ according to a request

Parameters
  • q – request in API syntax. “user_group~06” will search every linked account

  • zone – code of the IZ, NZ or “all” for all IZs NZ excepted.

  • env – “P” for production, “S” for sandbox. Default is production

Returns

list of almapiwrapper.users.User

fetch_user_in_all_iz function

almapiwrapper.users.fetch_user_in_all_iz(primary_id: str, env: Optional[Literal['P', 'S']] = 'P') List[User]

Fetch by primary ID a user in all IZ

Parameters
  • primary_id – primary ID of the user to search across all IZs

  • env – “P” for production, “S” for sandbox. Default is production

Returns

list of almapiwrapper.users.User

check_synchro function

almapiwrapper.users.check_synchro(nz_users: Union[List[User], User]) Optional[List[User]]

Test if a NZ user is synchronized with copies of the account across IZs. :param nz_users: list of almapiwrapper.users.User or only one almapiwrapper.users.User :return: list of almapiwrapper.users.User with not synchronized IZ user accounts

force_synchro function

almapiwrapper.users.force_synchro(nz_users: Union[List[User], User]) List[str]

Force synchronization of a NZ user with copies of the account across IZs. :param nz_users: list of almapiwrapper.users.User or only one almapiwrapper.users.User :return: list of errors