Get group

ENDPOINT /api/v0-user/group/[groupcode] (GET only)

When generating URLs, [groupcode] is the API code of a group SecurityPrincipal


This request can respond with following kinds, in addition to the generic kinds (see Introduction):

Kind Meaning HTTP status
haplo:api-v0:user:group-details The request was successful and the group’s users and details have been returned 200

Along with the standard success and kind fields (see Introduction for explanation), the response has the following structure:

  • users
  • group
    • id
    • nameFirst
    • nameLast
    • name
    • code
    • email
    • ref
    • isGroup
    • isActive
    • isSuperUser
    • isServiceUser
    • isAnonymous
    • localeId
    • tags
    • directGroupMembership

The users field is an array of the IDs of all active users who are members of this group, whether directly, or indirectly through another group that is a member of this group. This array does not include groups.

Apart from directGroupMembership, all the fields correspond directly to the equivalent field on the SecurityPrincipal. directGroupMembership is the equivalent of directGroupIds, but returns an array of group API codes instead of group IDs.

Example response

    "success": true,
    "kind": "haplo:api-v0:user:group-details",
    "users": [123, 456, 789],
    "group": {
        "name":"Test group",
        "tags": {
            "tagName": "tagValue"