Skip to content
On this page

Group API ​

EndpointMethodDescription
group:createGroupwebsocketCreate group
group:deleteGroupwebsocketDelete group
group:updateGroupwebsocketUpdate group
group:getGroupwebsocketGet group
group:getGroupMemberwebsocketGet group member
group:joinGroupwebsocketJoin group
group:addGroupMemberswebsocketAdd group members
group:deleteGroupMemberswebsocketDelete group members
group:updateMemberRolewebsocketUpdate member role
group:searchUserGroupswebsocketSearch user groups
group:searchGroupMemberswebsocketSearch group members
group:discoverGroupswebsocketDiscover groups by cbac
group:onGroupCreatedwebsocketEventOn group created event
group:onGroupDeletedwebsocketEventOn group deleted event
group:onGroupUpdatedwebsocketEventOn group updated event
group:onGroupMembersAddedwebsocketEventOn group members added event
group:onGroupMembersDeletedwebsocketEventOn group members deleted event
group:onGroupMemberUpdatedwebsocketEventOn group member updated event

Create group ​

Method: websocket

Endpoint: group:createGroup

Request:

{
    "data": {
        "groupName": string
        "groupType": uint32
        "thumbnailId": string
        "memberUserIds": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "group": {
            "groupId": string
            "groupName": string
            "groupType": uint32
            "created": timestamp
            "networkId": string
            "thumbnailId": string
            "membersCount": int
            "cbacPolicies": [{  // present only when the group has CBAC configured
                "policyId": string
                "badgeIds": [ string ]
                "badgeMatchMode": string
                "grantedPermission": string
            }]
            "userId": string
            "joined": timestamp
            "groupRole": string  // Admin / Moderator / Participant
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete group ​

Method: websocket

Endpoint: group:deleteGroup

Request:

{
    "data": {
        "groupId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Update group ​

Method: websocket

Endpoint: group:updateGroup

Request:

{
    "data": {
        "groupId": string
        "groupName": string
        "groupType": uint32
        "thumbnailId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Get group ​

Method: websocket

Endpoint: group:getGroup

Request:

{
    "data": {
        "groupId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "group": {
            "groupId": string
            "groupName": string
            "groupType": uint32
            "created": timestamp
            "networkId": string
            "thumbnailId": string
            "membersCount": int
            "cbacPolicies": [{  // present only when the group has CBAC configured
                "policyId": string
                "badgeIds": [ string ]
                "badgeMatchMode": string
                "grantedPermission": string
            }]
            "userId": string
            "joined": timestamp
            "groupRole": string  // Admin / Moderator / Participant
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get group member ​

Method: websocket

Endpoint: group:getGroupMember

Description: Returns a single group member's role and join time. The calling user must have view access to the group.

Request:

{
    "data": {
        "groupId": string
        "userId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "userId": string
        "joined": timestamp
        "groupRole": string  // Admin / Moderator / Participant
    }
    "error": { "status": bool, "code": int, "message": string }
}

Join group ​

Method: websocket

Endpoint: group:joinGroup

Description: Joins the calling user to the specified group via CBAC. The user must hold a badge that satisfies CBAC policy on the target group.

Request:

{
    "data": {
        "groupId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Add group members ​

Method: websocket

Endpoint: group:addGroupMembers

Request:

{
    "data": {
        "groupId": string
        "memberUserIds": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete group members ​

Method: websocket

Endpoint: group:deleteGroupMembers

Request:

{
    "data": {
        "groupId": string
        "memberUserIds": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Update member role ​

Method: websocket

Endpoint: group:updateMemberRole

Request:

{
    "data": {
        "groupId": string
        "memberId": string
        "groupRole": string  // Admin / Moderator / Participant
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Search user groups ​

Method: websocket

Endpoint: group:searchUserGroups

Request:

{
    "data": {
        "query": string  // search query
        "cursor": string  // pagination cursor, skip previous search results
        "limit": int  // maximum amount to return
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "searchResult": [{
            "groupId": string
            "groupName": string
            "groupType": uint32
            "created": timestamp
            "networkId": string
            "thumbnailId": string
            "membersCount": int
            "cbacPolicies": [{  // present only when the group has CBAC configured
                "policyId": string
                "badgeIds": [ string ]
                "badgeMatchMode": string
                "grantedPermission": string
            }]
            "userId": string
            "joined": timestamp
            "groupRole": string  // Admin / Moderator / Participant
        }]
        "cursor": string  // pagination cursor, use for fetching next page
        "hasMore": bool  // indication if there are more items available for search
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search group members ​

Method: websocket

Endpoint: group:searchGroupMembers

Request:

{
    "data": {
        "groupId": string
        "query": string  // search query
        "cursor": string  // pagination cursor, skip previous search results
        "limit": int  // maximum amount to return
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "searchResult": [{
            "user": { user simple structure }
            "groupRole": string  // Admin / Moderator / Participant
            "joined": timestamp
        }]
        "cursor": string  // pagination cursor, use for fetching next page
        "hasMore": bool  // indication if there are more items available for search
    }
    "error": { "status": bool, "code": int, "message": string }
}

Discover groups by cbac ​

Method: websocket

Endpoint: group:discoverGroups

Description: Returns groups that the caller can join via CBAC. Lists the caller's badges, finds all group targets reachable by those badges, and returns the matching group models with cbacPolicies populated.

Request:

{
    "data": {
        "query": string  // search query
        "cursor": string  // pagination cursor, skip previous search results
        "limit": int  // maximum amount to return
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "searchResult": [{
            "groupId": string
            "groupName": string
            "groupType": uint32
            "created": timestamp
            "networkId": string
            "thumbnailId": string
            "membersCount": int
            "cbacPolicies": [{  // present only when the group has CBAC configured
                "policyId": string
                "badgeIds": [ string ]
                "badgeMatchMode": string
                "grantedPermission": string
            }]
            "userId": string
            "joined": timestamp
            "groupRole": string  // Admin / Moderator / Participant
        }]
        "cursor": string  // pagination cursor, use for fetching next page
        "hasMore": bool  // indication if there are more items available for search
    }
    "error": { "status": bool, "code": int, "message": string }
}

On group created event ​

Event: group:onGroupCreated

Data:

{
    "data": {
        "group": {
            "groupId": string
            "groupName": string
            "groupType": uint32
            "created": timestamp
            "networkId": string
            "thumbnailId": string
            "membersCount": int
            "cbacPolicies": [{  // present only when the group has CBAC configured
                "policyId": string
                "badgeIds": [ string ]
                "badgeMatchMode": string
                "grantedPermission": string
            }]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On group deleted event ​

Event: group:onGroupDeleted

Data:

{
    "data": {
        "groupId": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

On group updated event ​

Event: group:onGroupUpdated

Data:

{
    "data": {
        "group": {
            "groupId": string
            "groupName": string
            "groupType": uint32
            "created": timestamp
            "networkId": string
            "thumbnailId": string
            "membersCount": int
            "cbacPolicies": [{  // present only when the group has CBAC configured
                "policyId": string
                "badgeIds": [ string ]
                "badgeMatchMode": string
                "grantedPermission": string
            }]
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On group members added event ​

Event: group:onGroupMembersAdded

Data:

{
    "data": {
        "groupId": string
        "members": [{
            "userId": string
            "joined": timestamp
            "groupRole": string  // Admin / Moderator / Participant
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On group members deleted event ​

Event: group:onGroupMembersDeleted

Data:

{
    "data": {
        "groupId": string
        "memberIds": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On group member updated event ​

Event: group:onGroupMemberUpdated

Data:

{
    "data": {
        "groupId": string
        "member": {
            "userId": string
            "joined": timestamp
            "groupRole": string  // Admin / Moderator / Participant
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Models ​


User Simple ​

{
    "id": string
    "firstName": string
    "lastName": string
    "privacyMode": int  // 0 - Default, 1 - Incognito
    "avatar": string
    "avatar3D": {  // field is not returned if empty
        "assetId": string
        "assetSkins": map[string]string  // map of selected skins per variants
        "avatarResourceId": string  // resource id (in case of avatar uploaded to user3DAvatar belonging)
        "avatarUrl": string  // url to gbl file (Ready Player Me)
        "avatarUserId": string  // user id for session recovery (Ready Player Me)
    }
    "companyName": string  // name of company that user represents
    "companyTitle": string  // user title in the company
}