6.5 Get Group By Id

The getGroupById returns details of a group. Details include groupId, name, type, groupMembers. Any existing member of the group can retrieve details of the group, including the list of all the group members.

The function takes the following parameters :

  • sessionId : Unique SessionId which is received in the authenticate function response.

  • groupId : Group Id of the Group.

response = bayunCore.getGroupById("<sessionId>", "<groupId>")
print("\nGroup Id : " + response.groupId)
print("Group Name : " + response.name)

if response.type == bayunCore.GroupTypePublic:
    print("Group Type : Public")
else:
    print("Group Type : Private")
    
groupMembers = response.getGroupMembers()
for member in groupMembers:
    print("\nCompany EmployeeId : " + member.companyEmployeeId)
    print("Company Id : " + member.companyId)
    print("Company Name : " + member.companyName)

Last updated