Class RoleAssignmentApi

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T16:47:02.065887-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class RoleAssignmentApi extends Object
  • Constructor Details

    • RoleAssignmentApi

      public RoleAssignmentApi()
    • RoleAssignmentApi

      public RoleAssignmentApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • assignRoleToGroup

      public Role assignRoleToGroup(String groupId, AssignRoleRequest assignRoleRequest, Boolean disableNotifications) throws ApiException
      Assign a Role to a Group Assigns a role to a group
      Parameters:
      groupId - The `id` of the group (required)
      assignRoleRequest - (required)
      disableNotifications - Setting this to `true` grants the group third-party admin status (optional)
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • assignRoleToGroup

      public Role assignRoleToGroup(String groupId, AssignRoleRequest assignRoleRequest, Boolean disableNotifications, Map<String,String> additionalHeaders) throws ApiException
      Assign a Role to a Group Assigns a role to a group
      Parameters:
      groupId - The `id` of the group (required)
      assignRoleRequest - (required)
      disableNotifications - Setting this to `true` grants the group third-party admin status (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • assignRoleToUser

      public Role assignRoleToUser(String userId, AssignRoleRequest assignRoleRequest, Boolean disableNotifications) throws ApiException
      Assign a Role to a User Assigns a role to a user identified by `userId`
      Parameters:
      userId - (required)
      assignRoleRequest - (required)
      disableNotifications - Setting this to `true` grants the user third-party admin status (optional)
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • assignRoleToUser

      public Role assignRoleToUser(String userId, AssignRoleRequest assignRoleRequest, Boolean disableNotifications, Map<String,String> additionalHeaders) throws ApiException
      Assign a Role to a User Assigns a role to a user identified by `userId`
      Parameters:
      userId - (required)
      assignRoleRequest - (required)
      disableNotifications - Setting this to `true` grants the user third-party admin status (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • getGroupAssignedRole

      public Role getGroupAssignedRole(String groupId, String roleId) throws ApiException
      Retrieve a Role assigned to Group Retrieves a role identified by `roleId` assigned to group identified by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      roleId - `id` of the Role (required)
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • getGroupAssignedRole

      public Role getGroupAssignedRole(String groupId, String roleId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a Role assigned to Group Retrieves a role identified by `roleId` assigned to group identified by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      roleId - `id` of the Role (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • getUserAssignedRole

      public Role getUserAssignedRole(String userId, String roleId) throws ApiException
      Retrieve a Role assigned to a User Retrieves a role identified by `roleId` assigned to a user identified by `userId`
      Parameters:
      userId - (required)
      roleId - `id` of the Role (required)
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • getUserAssignedRole

      public Role getUserAssignedRole(String userId, String roleId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a Role assigned to a User Retrieves a role identified by `roleId` assigned to a user identified by `userId`
      Parameters:
      userId - (required)
      roleId - `id` of the Role (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Role
      Throws:
      ApiException - if fails to make API call
    • listAssignedRolesForUser

      public List<Role> listAssignedRolesForUser(String userId, String expand) throws ApiException
      List all Roles assigned to a User Lists all roles assigned to a user identified by `userId`
      Parameters:
      userId - (required)
      expand - (optional)
      Returns:
      List<Role>
      Throws:
      ApiException - if fails to make API call
    • listAssignedRolesForUser

      public List<Role> listAssignedRolesForUser(String userId, String expand, Map<String,String> additionalHeaders) throws ApiException
      List all Roles assigned to a User Lists all roles assigned to a user identified by `userId`
      Parameters:
      userId - (required)
      expand - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Role>
      Throws:
      ApiException - if fails to make API call
    • listGroupAssignedRoles

      public List<Role> listGroupAssignedRoles(String groupId, String expand) throws ApiException
      List all Assigned Roles of Group Lists all assigned roles of group identified by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      expand - (optional)
      Returns:
      List<Role>
      Throws:
      ApiException - if fails to make API call
    • listGroupAssignedRoles

      public List<Role> listGroupAssignedRoles(String groupId, String expand, Map<String,String> additionalHeaders) throws ApiException
      List all Assigned Roles of Group Lists all assigned roles of group identified by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      expand - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Role>
      Throws:
      ApiException - if fails to make API call
    • listUsersWithRoleAssignments

      public RoleAssignedUsers listUsersWithRoleAssignments(String after, Integer limit) throws ApiException
      List all Users with Role Assignments Lists all users with Role Assignments
      Parameters:
      after - (optional)
      limit - Specifies the number of results returned. Defaults to `100`. (optional, default to 100)
      Returns:
      RoleAssignedUsers
      Throws:
      ApiException - if fails to make API call
    • listUsersWithRoleAssignments

      public RoleAssignedUsers listUsersWithRoleAssignments(String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Users with Role Assignments Lists all users with Role Assignments
      Parameters:
      after - (optional)
      limit - Specifies the number of results returned. Defaults to `100`. (optional, default to 100)
      additionalHeaders - additionalHeaders for this call
      Returns:
      RoleAssignedUsers
      Throws:
      ApiException - if fails to make API call
    • unassignRoleFromGroup

      public void unassignRoleFromGroup(String groupId, String roleId) throws ApiException
      Unassign a Role from a Group Unassigns a role identified by `roleId` assigned to group identified by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      roleId - `id` of the Role (required)
      Throws:
      ApiException - if fails to make API call
    • unassignRoleFromGroup

      public void unassignRoleFromGroup(String groupId, String roleId, Map<String,String> additionalHeaders) throws ApiException
      Unassign a Role from a Group Unassigns a role identified by `roleId` assigned to group identified by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      roleId - `id` of the Role (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • unassignRoleFromUser

      public void unassignRoleFromUser(String userId, String roleId) throws ApiException
      Unassign a Role from a User Unassigns a role identified by `roleId` from a user identified by `userId`
      Parameters:
      userId - (required)
      roleId - `id` of the Role (required)
      Throws:
      ApiException - if fails to make API call
    • unassignRoleFromUser

      public void unassignRoleFromUser(String userId, String roleId, Map<String,String> additionalHeaders) throws ApiException
      Unassign a Role from a User Unassigns a role identified by `roleId` from a user identified by `userId`
      Parameters:
      userId - (required)
      roleId - `id` of the Role (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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