GET /api/groups/:group_id/memberships

get a list of membership records for a group that the user has access to

Success Response Code: 200

Params

Param name Description
group_id
required

id / name of the group


Value: Must be a String
separate_roles
optional

list admins before members (default=false)


Value: Must be one of: <code>true</code>, <code>false</code>.
page
optional

page number to view (default=1)


Value: Must be a Integer
per_page
optional

number of users to be returned per page (default=20, max=500)


Value: Must be a Integer

Response Fields

group_memberships group memberships Array<GroupMembership>
id group membership object id Integer
user_id user id for the member Integer
role user's role ["Admin", "Member", "External Contributor"]
role_key key value of user's role ["admin", "member"]

Example Curl Commands

curl -X GET -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/hrteam/memberships.json

Examples

GET /api/groups/20/memberships.json
200
{
  "group_memberships": [
    {
      "id": 47,
      "user_id": 32,
      "role": "Member",
      "role_key": "member"
    },
    {
      "id": 36,
      "user_id": 37,
      "role": "Admin",
      "role_key": "admin"
    }
  ]
}
GET /api/groups/20/memberships.json
200
{
  "group_memberships": [
    {
      "id": 36,
      "user_id": 37,
      "role": "Admin",
      "role_key": "admin"
    },
    {
      "id": 48,
      "user_id": 32,
      "role": "Member",
      "role_key": "member"
    }
  ]
}