Class GroupApi

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

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

    • GroupApi

      public GroupApi()
    • GroupApi

      public GroupApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • activateGroupRule

      public void activateGroupRule(String groupRuleId) throws ApiException
      Activate a Group Rule Activates a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      Throws:
      ApiException - if fails to make API call
    • activateGroupRule

      public void activateGroupRule(String groupRuleId, Map<String,String> additionalHeaders) throws ApiException
      Activate a Group Rule Activates a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • assignGroupOwner

      public GroupOwner assignGroupOwner(String groupId, AssignGroupOwnerRequestBody assignGroupOwnerRequestBody) throws ApiException
      Assign a Group Owner Assigns a group owner
      Parameters:
      groupId - The `id` of the group (required)
      assignGroupOwnerRequestBody - (required)
      Returns:
      GroupOwner
      Throws:
      ApiException - if fails to make API call
    • assignGroupOwner

      public GroupOwner assignGroupOwner(String groupId, AssignGroupOwnerRequestBody assignGroupOwnerRequestBody, Map<String,String> additionalHeaders) throws ApiException
      Assign a Group Owner Assigns a group owner
      Parameters:
      groupId - The `id` of the group (required)
      assignGroupOwnerRequestBody - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GroupOwner
      Throws:
      ApiException - if fails to make API call
    • assignUserToGroup

      public void assignUserToGroup(String groupId, String userId) throws ApiException
      Assign a User Assigns a user to a group with 'OKTA_GROUP' type
      Parameters:
      groupId - The `id` of the group (required)
      userId - (required)
      Throws:
      ApiException - if fails to make API call
    • assignUserToGroup

      public void assignUserToGroup(String groupId, String userId, Map<String,String> additionalHeaders) throws ApiException
      Assign a User Assigns a user to a group with 'OKTA_GROUP' type
      Parameters:
      groupId - The `id` of the group (required)
      userId - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • createGroup

      public Group createGroup(Group group) throws ApiException
      Create a Group Creates a new group with `OKTA_GROUP` type
      Parameters:
      group - (required)
      Returns:
      Group
      Throws:
      ApiException - if fails to make API call
    • createGroup

      public Group createGroup(Group group, Map<String,String> additionalHeaders) throws ApiException
      Create a Group Creates a new group with `OKTA_GROUP` type
      Parameters:
      group - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Group
      Throws:
      ApiException - if fails to make API call
    • createGroupRule

      public GroupRule createGroupRule(GroupRule groupRule) throws ApiException
      Create a Group Rule Creates a group rule to dynamically add users to the specified group if they match the condition
      Parameters:
      groupRule - (required)
      Returns:
      GroupRule
      Throws:
      ApiException - if fails to make API call
    • createGroupRule

      public GroupRule createGroupRule(GroupRule groupRule, Map<String,String> additionalHeaders) throws ApiException
      Create a Group Rule Creates a group rule to dynamically add users to the specified group if they match the condition
      Parameters:
      groupRule - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GroupRule
      Throws:
      ApiException - if fails to make API call
    • deactivateGroupRule

      public void deactivateGroupRule(String groupRuleId) throws ApiException
      Deactivate a Group Rule Deactivates a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      Throws:
      ApiException - if fails to make API call
    • deactivateGroupRule

      public void deactivateGroupRule(String groupRuleId, Map<String,String> additionalHeaders) throws ApiException
      Deactivate a Group Rule Deactivates a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteGroup

      public void deleteGroup(String groupId) throws ApiException
      Delete a Group Deletes a group with `OKTA_GROUP` type
      Parameters:
      groupId - The `id` of the group (required)
      Throws:
      ApiException - if fails to make API call
    • deleteGroup

      public void deleteGroup(String groupId, Map<String,String> additionalHeaders) throws ApiException
      Delete a Group Deletes a group with `OKTA_GROUP` type
      Parameters:
      groupId - The `id` of the group (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteGroupOwner

      public void deleteGroupOwner(String groupId, String ownerId) throws ApiException
      Delete a Group Owner Deletes a group owner from a specific group
      Parameters:
      groupId - The `id` of the group (required)
      ownerId - The `id` of the group owner (required)
      Throws:
      ApiException - if fails to make API call
    • deleteGroupOwner

      public void deleteGroupOwner(String groupId, String ownerId, Map<String,String> additionalHeaders) throws ApiException
      Delete a Group Owner Deletes a group owner from a specific group
      Parameters:
      groupId - The `id` of the group (required)
      ownerId - The `id` of the group owner (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteGroupRule

      public void deleteGroupRule(String groupRuleId, Boolean removeUsers) throws ApiException
      Delete a group Rule Deletes a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      removeUsers - Indicates whether to keep or remove users from groups assigned by this rule. (optional)
      Throws:
      ApiException - if fails to make API call
    • deleteGroupRule

      public void deleteGroupRule(String groupRuleId, Boolean removeUsers, Map<String,String> additionalHeaders) throws ApiException
      Delete a group Rule Deletes a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      removeUsers - Indicates whether to keep or remove users from groups assigned by this rule. (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getGroup

      public Group getGroup(String groupId) throws ApiException
      Retrieve a Group Retrieves a group by `groupId`
      Parameters:
      groupId - The `id` of the group (required)
      Returns:
      Group
      Throws:
      ApiException - if fails to make API call
    • getGroup

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

      public GroupRule getGroupRule(String groupRuleId, String expand) throws ApiException
      Retrieve a Group Rule Retrieves a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      expand - (optional)
      Returns:
      GroupRule
      Throws:
      ApiException - if fails to make API call
    • getGroupRule

      public GroupRule getGroupRule(String groupRuleId, String expand, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a Group Rule Retrieves a specific group rule by `groupRuleId`
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      expand - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GroupRule
      Throws:
      ApiException - if fails to make API call
    • listAssignedApplicationsForGroup

      public List<Application> listAssignedApplicationsForGroup(String groupId, String after, Integer limit) throws ApiException
      List all Assigned Applications Lists all applications that are assigned to a group
      Parameters:
      groupId - The `id` of the group (required)
      after - Specifies the pagination cursor for the next page of apps (optional)
      limit - Specifies the number of app results for a page (optional, default to 20)
      Returns:
      List<Application>
      Throws:
      ApiException - if fails to make API call
    • listAssignedApplicationsForGroup

      public List<Application> listAssignedApplicationsForGroup(String groupId, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Assigned Applications Lists all applications that are assigned to a group
      Parameters:
      groupId - The `id` of the group (required)
      after - Specifies the pagination cursor for the next page of apps (optional)
      limit - Specifies the number of app results for a page (optional, default to 20)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Application>
      Throws:
      ApiException - if fails to make API call
    • listGroupOwners

      public List<GroupOwner> listGroupOwners(String groupId, String filter, String after, Integer limit) throws ApiException
      List all Group Owners Lists all owners for a specific group
      Parameters:
      groupId - The `id` of the group (required)
      filter - SCIM Filter expression for group owners. Allows to filter owners by type. (optional)
      after - Specifies the pagination cursor for the next page of owners (optional)
      limit - Specifies the number of owner results in a page (optional, default to 1000)
      Returns:
      List<GroupOwner>
      Throws:
      ApiException - if fails to make API call
    • listGroupOwners

      public List<GroupOwner> listGroupOwners(String groupId, String filter, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Group Owners Lists all owners for a specific group
      Parameters:
      groupId - The `id` of the group (required)
      filter - SCIM Filter expression for group owners. Allows to filter owners by type. (optional)
      after - Specifies the pagination cursor for the next page of owners (optional)
      limit - Specifies the number of owner results in a page (optional, default to 1000)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<GroupOwner>
      Throws:
      ApiException - if fails to make API call
    • listGroupRules

      public List<GroupRule> listGroupRules(Integer limit, String after, String search, String expand) throws ApiException
      List all Group Rules Lists all group rules
      Parameters:
      limit - Specifies the number of rule results in a page (optional, default to 50)
      after - Specifies the pagination cursor for the next page of rules (optional)
      search - Specifies the keyword to search fules for (optional)
      expand - If specified as `groupIdToGroupNameMap`, then show group names (optional)
      Returns:
      List<GroupRule>
      Throws:
      ApiException - if fails to make API call
    • listGroupRules

      public List<GroupRule> listGroupRules(Integer limit, String after, String search, String expand, Map<String,String> additionalHeaders) throws ApiException
      List all Group Rules Lists all group rules
      Parameters:
      limit - Specifies the number of rule results in a page (optional, default to 50)
      after - Specifies the pagination cursor for the next page of rules (optional)
      search - Specifies the keyword to search fules for (optional)
      expand - If specified as `groupIdToGroupNameMap`, then show group names (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<GroupRule>
      Throws:
      ApiException - if fails to make API call
    • listGroupUsers

      public List<User> listGroupUsers(String groupId, String after, Integer limit) throws ApiException
      List all Member Users Lists all users that are a member of a group
      Parameters:
      groupId - The `id` of the group (required)
      after - Specifies the pagination cursor for the next page of users (optional)
      limit - Specifies the number of user results in a page (optional, default to 1000)
      Returns:
      List<User>
      Throws:
      ApiException - if fails to make API call
    • listGroupUsers

      public List<User> listGroupUsers(String groupId, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Member Users Lists all users that are a member of a group
      Parameters:
      groupId - The `id` of the group (required)
      after - Specifies the pagination cursor for the next page of users (optional)
      limit - Specifies the number of user results in a page (optional, default to 1000)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<User>
      Throws:
      ApiException - if fails to make API call
    • listGroups

      public List<Group> listGroups(String q, String filter, String after, Integer limit, String expand, String search, String sortBy, String sortOrder) throws ApiException
      List all Groups Lists all groups with pagination support. A subset of groups can be returned that match a supported filter expression or query.
      Parameters:
      q - Searches the name property of groups for matching value (optional)
      filter - Filter expression for groups (optional)
      after - Specifies the pagination cursor for the next page of groups (optional)
      limit - Specifies the number of group results in a page (optional, default to 10000)
      expand - If specified, it causes additional metadata to be included in the response. (optional)
      search - Searches for groups with a supported filtering expression for all attributes except for _embedded, _links, and objectClass (optional)
      sortBy - Specifies field to sort by and can be any single property (for search queries only). (optional)
      sortOrder - Specifies sort order `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` is not present. Groups with the same value for the `sortBy` parameter are ordered by `id`. (optional, default to asc)
      Returns:
      List<Group>
      Throws:
      ApiException - if fails to make API call
    • listGroups

      public List<Group> listGroups(String q, String filter, String after, Integer limit, String expand, String search, String sortBy, String sortOrder, Map<String,String> additionalHeaders) throws ApiException
      List all Groups Lists all groups with pagination support. A subset of groups can be returned that match a supported filter expression or query.
      Parameters:
      q - Searches the name property of groups for matching value (optional)
      filter - Filter expression for groups (optional)
      after - Specifies the pagination cursor for the next page of groups (optional)
      limit - Specifies the number of group results in a page (optional, default to 10000)
      expand - If specified, it causes additional metadata to be included in the response. (optional)
      search - Searches for groups with a supported filtering expression for all attributes except for _embedded, _links, and objectClass (optional)
      sortBy - Specifies field to sort by and can be any single property (for search queries only). (optional)
      sortOrder - Specifies sort order `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` is not present. Groups with the same value for the `sortBy` parameter are ordered by `id`. (optional, default to asc)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Group>
      Throws:
      ApiException - if fails to make API call
    • replaceGroup

      public Group replaceGroup(String groupId, Group group) throws ApiException
      Replace a Group Replaces the profile for a group with `OKTA_GROUP` type
      Parameters:
      groupId - The `id` of the group (required)
      group - (required)
      Returns:
      Group
      Throws:
      ApiException - if fails to make API call
    • replaceGroup

      public Group replaceGroup(String groupId, Group group, Map<String,String> additionalHeaders) throws ApiException
      Replace a Group Replaces the profile for a group with `OKTA_GROUP` type
      Parameters:
      groupId - The `id` of the group (required)
      group - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Group
      Throws:
      ApiException - if fails to make API call
    • replaceGroupRule

      public GroupRule replaceGroupRule(String groupRuleId, GroupRule groupRule) throws ApiException
      Replace a Group Rule Replaces a group rule. Only `INACTIVE` rules can be updated.
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      groupRule - (required)
      Returns:
      GroupRule
      Throws:
      ApiException - if fails to make API call
    • replaceGroupRule

      public GroupRule replaceGroupRule(String groupRuleId, GroupRule groupRule, Map<String,String> additionalHeaders) throws ApiException
      Replace a Group Rule Replaces a group rule. Only `INACTIVE` rules can be updated.
      Parameters:
      groupRuleId - The `id` of the group rule (required)
      groupRule - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GroupRule
      Throws:
      ApiException - if fails to make API call
    • unassignUserFromGroup

      public void unassignUserFromGroup(String groupId, String userId) throws ApiException
      Unassign a User Unassigns a user from a group with 'OKTA_GROUP' type
      Parameters:
      groupId - The `id` of the group (required)
      userId - (required)
      Throws:
      ApiException - if fails to make API call
    • unassignUserFromGroup

      public void unassignUserFromGroup(String groupId, String userId, Map<String,String> additionalHeaders) throws ApiException
      Unassign a User Unassigns a user from a group with 'OKTA_GROUP' type
      Parameters:
      groupId - The `id` of the group (required)
      userId - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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