Package com.atlan.api

Class GroupsEndpoint


public class GroupsEndpoint extends HeraclesEndpoint
API endpoints for interacting with Atlan's groups.
  • Constructor Details

    • GroupsEndpoint

      public GroupsEndpoint(AtlanClient client)
  • Method Details

    • list

      public GroupResponse list(GroupRequest request) throws AtlanException
      Retrieve groups defined in Atlan.
      Parameters:
      request - containing details about which groups to retrieve
      Returns:
      a list of the groups in Atlan
      Throws:
      AtlanException - on any API communication issue
    • list

      public GroupResponse list(GroupRequest request, RequestOptions options) throws AtlanException
      Retrieve groups defined in Atlan.
      Parameters:
      request - containing details about which groups to retrieve
      options - to override default client settings
      Returns:
      a list of the groups in Atlan
      Throws:
      AtlanException - on any API communication issue
    • list

      public GroupResponse list(String filter, String sort, boolean count, int offset, int limit) throws AtlanException
      Retrieves a list of the groups defined in Atlan.
      Parameters:
      filter - which groups to retrieve
      sort - property by which to sort the results
      count - whether to return the total number of records (true) or not (false)
      offset - starting point for results to return, for paging
      limit - maximum number of results to be returned
      Returns:
      a list of groups that match the provided criteria
      Throws:
      AtlanException - on any API communication issue
    • list

      public GroupResponse list(String filter, String sort, boolean count, int offset, int limit, RequestOptions options) throws AtlanException
      Retrieves a list of the groups defined in Atlan.
      Parameters:
      filter - which groups to retrieve
      sort - property by which to sort the results
      count - whether to return the total number of records (true) or not (false)
      offset - starting point for results to return, for paging
      limit - maximum number of results to be returned
      options - to override default client settings
      Returns:
      a list of groups that match the provided criteria
      Throws:
      AtlanException - on any API communication issue
    • list

      public GroupResponse list(String filter) throws AtlanException
      Retrieves a list of the groups defined in Atlan.
      Parameters:
      filter - which groups to retrieve
      Returns:
      a list of groups that match the provided criteria
      Throws:
      AtlanException - on any API communication issue
    • list

      public GroupResponse list(String filter, RequestOptions options) throws AtlanException
      Retrieves a list of the groups defined in Atlan.
      Parameters:
      filter - which groups to retrieve
      options - to override default client settings
      Returns:
      a list of groups that match the provided criteria
      Throws:
      AtlanException - on any API communication issue
    • list

      public List<AtlanGroup> list() throws AtlanException
      Retrieve all groups defined in Atlan.
      Returns:
      a list of all the groups in Atlan
      Throws:
      AtlanException - on any API communication issue
    • list

      public List<AtlanGroup> list(RequestOptions options) throws AtlanException
      Retrieve all groups defined in Atlan.
      Parameters:
      options - to override default client settings
      Returns:
      a list of all the groups in Atlan
      Throws:
      AtlanException - on any API communication issue
    • list

      public List<AtlanGroup> list(int pageSize, RequestOptions options) throws AtlanException
      Retrieve all groups defined in Atlan.
      Parameters:
      pageSize - maximum number of groups to retrieve per request
      options - to override default client settings
      Returns:
      a list of all the groups in Atlan
      Throws:
      AtlanException - on any API communication issue
    • get

      public List<AtlanGroup> get(String alias) throws AtlanException
      Retrieves all groups with a name that contains the provided string. (This could include a complete group name, in which case there should be at most a single item in the returned list, or could be a partial group name to retrieve all groups with that naming convention.)
      Parameters:
      alias - name (as it appears in the UI) on which to filter the groups
      Returns:
      all groups whose name (in the UI) contains the provided string
      Throws:
      AtlanException - on any error during API invocation
    • get

      public List<AtlanGroup> get(String alias, RequestOptions options) throws AtlanException
      Retrieves all groups with a name that contains the provided string. (This could include a complete group name, in which case there should be at most a single item in the returned list, or could be a partial group name to retrieve all groups with that naming convention.)
      Parameters:
      alias - name (as it appears in the UI) on which to filter the groups
      options - to override default client settings
      Returns:
      all groups whose name (in the UI) contains the provided string
      Throws:
      AtlanException - on any error during API invocation
    • create

      public String create(AtlanGroup group) throws AtlanException
      Create a new group.
      Parameters:
      group - the details of the new group
      Returns:
      the unique identifier (GUID) of the group that was created, or null if none was created
      Throws:
      AtlanException - on any API communication issue
    • create

      public String create(AtlanGroup group, RequestOptions options) throws AtlanException
      Create a new group.
      Parameters:
      group - the details of the new group
      options - to override default client settings
      Returns:
      the unique identifier (GUID) of the group that was created, or null if none was created
      Throws:
      AtlanException - on any API communication issue
    • create

      public CreateGroupResponse create(AtlanGroup group, List<String> userIds) throws AtlanException
      Create a new group and associate the provided users with it.
      Parameters:
      group - the details of the new group
      userIds - list of unique identifiers (GUIDs) of users to associate with the group
      Returns:
      details of the created group and user associations
      Throws:
      AtlanException - on any API communication issue
    • create

      public CreateGroupResponse create(AtlanGroup group, List<String> userIds, RequestOptions options) throws AtlanException
      Create a new group and associate the provided users with it.
      Parameters:
      group - the details of the new group
      userIds - list of unique identifiers (GUIDs) of users to associate with the group
      options - to override default client settings
      Returns:
      details of the created group and user associations
      Throws:
      AtlanException - on any API communication issue
    • update

      public void update(String id, AtlanGroup group) throws AtlanException
      Update a group.
      Parameters:
      id - unique identifier (GUID) of the group to update
      group - the details to update on the group
      Throws:
      AtlanException - on any API communication issue
    • update

      public void update(String id, AtlanGroup group, RequestOptions options) throws AtlanException
      Update a group.
      Parameters:
      id - unique identifier (GUID) of the group to update
      group - the details to update on the group
      options - to override default client settings
      Throws:
      AtlanException - on any API communication issue
    • listMembers

      public UserResponse listMembers(String id, UserRequest request) throws AtlanException
      Retrieves the members (users) of a group.
      Parameters:
      id - unique identifier (GUID) of the group from which to retrieve members
      request - containing details about which members to retrieve
      Returns:
      list of users that are members of the group
      Throws:
      AtlanException - on any API communication issue
    • listMembers

      public UserResponse listMembers(String id, UserRequest request, RequestOptions options) throws AtlanException
      Retrieves the members (users) of a group.
      Parameters:
      id - unique identifier (GUID) of the group from which to retrieve members
      request - containing details about which members to retrieve
      options - to override default client settings
      Returns:
      list of users that are members of the group
      Throws:
      AtlanException - on any API communication issue
    • listMembers

      public UserResponse listMembers(String id) throws AtlanException
      Retrieves the members (users) of a group.
      Parameters:
      id - unique identifier (GUID) of the group from which to retrieve members
      Returns:
      list of users that are members of the group
      Throws:
      AtlanException - on any API communication issue
    • listMembers

      public UserResponse listMembers(String id, RequestOptions options) throws AtlanException
      Retrieves the members (users) of a group.
      Parameters:
      id - unique identifier (GUID) of the group from which to retrieve members
      options - to override default client settings
      Returns:
      list of users that are members of the group
      Throws:
      AtlanException - on any API communication issue
    • removeMembers

      public void removeMembers(String id, List<String> userIds) throws AtlanException
      Remove one or more users from a group.
      Parameters:
      id - unique identifier (GUID) of the group from which to remove users
      userIds - unique identifiers (GUIDs) of the users to remove from the group
      Throws:
      AtlanException - on any API communication issue
    • removeMembers

      public void removeMembers(String id, List<String> userIds, RequestOptions options) throws AtlanException
      Remove one or more users from a group.
      Parameters:
      id - unique identifier (GUID) of the group from which to remove users
      userIds - unique identifiers (GUIDs) of the users to remove from the group
      options - to override default client settings
      Throws:
      AtlanException - on any API communication issue
    • purge

      public void purge(String id) throws AtlanException
      Delete a group.
      Parameters:
      id - unique identifier (GUID) of the group to delete
      Throws:
      AtlanException - on any API communication issue
    • purge

      public void purge(String id, RequestOptions options) throws AtlanException
      Delete a group.
      Parameters:
      id - unique identifier (GUID) of the group to delete
      options - to override default client settings
      Throws:
      AtlanException - on any API communication issue