Users#
- class UsersClient(*, sdk_config: SDKConfiguration, generated_client: ApiClient)[source]#
Bases:
objectClient for managing Arize users.
Unlike organizations, users are looked up by ID only — not by name — because display names are not unique within an account.
This class is primarily intended for internal use within the SDK. Users are highly encouraged to access resource-specific functionality via
arize.ArizeClient.The users client is a thin wrapper around the generated REST API client, using the shared generated API client owned by
arize.config.SDKConfiguration.- Parameters:
sdk_config (SDKConfiguration) – Resolved SDK configuration.
generated_client (ApiClient) – Shared generated API client instance.
- list(*, email: str | None = None, status: list[UserStatus] | None = None, limit: int = 50, cursor: str | None = None) UsersList200Response[source]#
List users in the account.
This endpoint supports cursor-based pagination. When provided,
emailfilters results to users whose email contains the given substring (case-insensitive).- Parameters:
email (str | None) – Optional case-insensitive partial-match filter on email address.
status (list[UserStatus] | None) – Optional list of statuses to filter by (e.g.
["active", "invited"]).limit (int) – Maximum number of users to return (1-100). The server enforces an upper bound of 100.
cursor (str | None) – Opaque pagination cursor from a previous response.
- Returns:
A paginated user list response from the Arize REST API.
- Raises:
ApiException – If the API request fails.
- Return type:
- create(*, name: str, email: str, role: PredefinedUserRole | CustomUserRole, invite_mode: InviteMode, is_developer: bool | None = None) User[source]#
Create a new user.
- Parameters:
name (str) – Display name for the user (1-255 characters).
email (str) – Email address (used as the idempotency key).
role (PredefinedUserRole | CustomUserRole) – Account-level role assignment. Use
PredefinedUserRole(name="<role>")for predefined roles (admin,member,annotator), orCustomUserRole(id="<role-id>")for custom RBAC roles.invite_mode (InviteMode) – Invite mode (
"none","email_link", or"temporary_password").is_developer (bool | None) – Whether the user should have developer permissions (can create GraphQL API keys). Defaults to
Trueforadminandmemberroles, andFalseforannotator.
- Returns:
The created user object.
- Raises:
ApiException – If the API request fails.
- Return type:
- update(*, user_id: str, name: str | None = None, is_developer: bool | None = None) User[source]#
Update a user’s metadata by ID.
- Parameters:
- Returns:
The updated user object.
- Raises:
ValueError – If neither
namenoris_developeris provided.ApiException – If the API request fails (for example, user not found or insufficient permissions).
- Return type:
- delete(*, user_id: str) None[source]#
Delete a user by ID.
This operation soft-deletes the user and cascades to organization memberships, space memberships, API keys, and role bindings.
- Parameters:
user_id (str) – User ID to delete.
- Returns:
This method returns None on success (204 No Content response).
- Raises:
ApiException – If the API request fails (for example, user not found or insufficient permissions).
- Return type:
None
- resend_invitation(*, user_id: str) None[source]#
Resend an invitation email for a pending user.
The target user must be in the
invitedstate.- Parameters:
user_id (str) – User ID to resend the invitation for.
- Returns:
This method returns None on success (202 Accepted response).
- Raises:
ApiException – If the API request fails (for example, user not found or user already active).
- Return type:
None
- reset_password(*, user_id: str) None[source]#
Trigger a password-reset email for a user.
Generates a reset token and sends the user a password-reset email with a 30-minute link.
The target user must authenticate via password (not SSO/SAML) and must have already verified their account.
- Parameters:
user_id (str) – User ID to send the password-reset email to.
- Returns:
This method returns None on success (204 No Content response).
- Raises:
ApiException – If the API request fails (for example, user not found, user authenticates via SSO, or user has not yet verified their account).
- Return type:
None
Response Types#
- class User(*, id: str, name: str, email: str, created_at: datetime, status: UserStatus, role: PredefinedUserRole | CustomUserRole, is_developer: bool)[source]#
Bases:
BaseModelAn account user with domain-typed role.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- status: UserStatus#
- role: Annotated[PredefinedUserRole | CustomUserRole, FieldInfo(annotation=NoneType, required=True, discriminator='type')]#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class UserCreatedResponse(*, id: Annotated[str, Strict(strict=True)], name: Annotated[str, Strict(strict=True)], email: Annotated[str, Strict(strict=True)], role: UserRoleAssignment, created_at: datetime, status: UserStatus, is_developer: Annotated[bool, Strict(strict=True)], invite_mode: InviteMode, temporary_password: SecretStr | None = None)[source]#
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
role (UserRoleAssignment)
created_at (datetime)
status (UserStatus)
invite_mode (InviteMode)
temporary_password (SecretStr | None)
- id: StrictStr#
- name: StrictStr#
- email: StrictStr#
- role: UserRoleAssignment#
- created_at: datetime#
- status: UserStatus#
- is_developer: StrictBool#
- invite_mode: InviteMode#
- model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod from_json(json_str: str) Self | None[source]#
Create an instance of UserCreatedResponse from a JSON string
- to_dict() Dict[str, Any][source]#
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- class UserRole(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
Account-level role of the user. These are pre-defined roles in Arize.
- ADMIN = 'admin'#
- MEMBER = 'member'#
- ANNOTATOR = 'annotator'#
- class UserStatus(value, names=_not_given, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
Current status of the user in the account. - active: User has verified their email and can access the platform. - invited: User has been invited and their verification token is still valid. - expired: User was invited but their verification token has expired or is missing. A new invite is required.
- ACTIVE = 'active'#
- INVITED = 'invited'#
- EXPIRED = 'expired'#
- class UsersList200Response(*, users: list[User], pagination: PaginationMetadata)[source]#
Bases:
BaseModelPaginated list of users with domain-typed roles.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- pagination: PaginationMetadata#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].