Class UserTypeApi

java.lang.Object
com.okta.sdk.resource.api.UserTypeApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]", comments="Generator version: 7.15.0") public class UserTypeApi extends Object
  • Constructor Details

    • UserTypeApi

      public UserTypeApi()
    • UserTypeApi

      public UserTypeApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createUserType

      public UserType createUserType(UserType userType) throws ApiException
      Create a user type Creates a new user type. Okta automatically creates a `default` user type for your org. You may add up to nine additional user types. > **Note**: New user types are based on the current default schema template. Modifications to this schema do not automatically propagate to previously created user types.
      Parameters:
      userType - (required)
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • createUserType

      public UserType createUserType(UserType userType, Map<String,String> additionalHeaders) throws ApiException
      Create a user type Creates a new user type. Okta automatically creates a `default` user type for your org. You may add up to nine additional user types. > **Note**: New user types are based on the current default schema template. Modifications to this schema do not automatically propagate to previously created user types.
      Parameters:
      userType - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • deleteUserType

      public void deleteUserType(String typeId) throws ApiException
      Delete a user type Deletes a user type permanently. > **Note**: You can't delete the default user type or a user type that is currently assigned to users.
      Parameters:
      typeId - (required)
      Throws:
      ApiException - if fails to make API call
    • deleteUserType

      public void deleteUserType(String typeId, Map<String,String> additionalHeaders) throws ApiException
      Delete a user type Deletes a user type permanently. > **Note**: You can't delete the default user type or a user type that is currently assigned to users.
      Parameters:
      typeId - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getUserType

      public UserType getUserType(String typeId) throws ApiException
      Retrieve a user type Retrieves a user type by ID. Use `default` to fetch the default user type.
      Parameters:
      typeId - (required)
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • getUserType

      public UserType getUserType(String typeId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a user type Retrieves a user type by ID. Use `default` to fetch the default user type.
      Parameters:
      typeId - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • listUserTypes

      public List<UserType> listUserTypes() throws ApiException
      List all user types Lists all user types in your org
      Returns:
      List<UserType>
      Throws:
      ApiException - if fails to make API call
    • listUserTypes

      public List<UserType> listUserTypes(Map<String,String> additionalHeaders) throws ApiException
      List all user types Lists all user types in your org
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<UserType>
      Throws:
      ApiException - if fails to make API call
    • listUserTypesPaged

      public Iterable<UserType> listUserTypesPaged()
      List all user types (Paginated) Lists all user types in your org This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Returns:
      Iterable<UserType> lazy iterable over all pages
    • listUserTypesPaged

      public Iterable<UserType> listUserTypesPaged(Map<String,String> additionalHeaders)
      List all user types (Paginated with additional headers) Lists all user types in your org This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<UserType> lazy iterable over all pages
    • replaceUserType

      public UserType replaceUserType(String typeId, UserTypePutRequest userType) throws ApiException
      Replace a user type Replaces an existing user type. This operation is a full update. > **Note**: The `name` of an existing user type can't be changed, but must be part of the request body. You can only replace the `displayName` and `description` elements.
      Parameters:
      typeId - (required)
      userType - (optional)
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • replaceUserType

      public UserType replaceUserType(String typeId, UserTypePutRequest userType, Map<String,String> additionalHeaders) throws ApiException
      Replace a user type Replaces an existing user type. This operation is a full update. > **Note**: The `name` of an existing user type can't be changed, but must be part of the request body. You can only replace the `displayName` and `description` elements.
      Parameters:
      typeId - (required)
      userType - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • updateUserType

      public UserType updateUserType(String typeId, UserTypePostRequest userType) throws ApiException
      Update a user type Updates an existing user type. This operation is a partial update. > **Note**: You can only update the `displayName` and `description` elements. The `name` of an existing user type can't be changed.
      Parameters:
      typeId - (required)
      userType - (required)
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • updateUserType

      public UserType updateUserType(String typeId, UserTypePostRequest userType, Map<String,String> additionalHeaders) throws ApiException
      Update a user type Updates an existing user type. This operation is a partial update. > **Note**: You can only update the `displayName` and `description` elements. The `name` of an existing user type can't be changed.
      Parameters:
      typeId - (required)
      userType - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      UserType
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()