GET /api/group_memberships

get a list of groups that the current user is a member of

Also see Groups#show.

Success Response Code: 200

Response Fields

group_memberships array of group membership entries Array<GroupMembership>
group_memberships[group] see Groups#show for details Group
group_memberships[role] user's role ["Admin", "Member", "External Contributor"]
group_memberships[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/group_memberships.json

Examples

GET 
200
{
  "group_memberships": [
    {
      "group": {
        "id": 19,
        "name": "ec&grøup1",
        "html_name": "ec&amp;grøup1",
        "url": "https://socialcast.socialcast.test/groups/19-ecgr%C3%B8up1",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "ecgrøup1",
        "groupname": "ecgrøup1",
        "private": true,
        "external_contributor": true,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/19-ecgr%C3%B8up1/messages_activity",
        "admin_ids": [
          35
        ],
        "description": null,
        "state": "active",
        "permission": "external_contributor",
        "group_type": "standard",
        "member_count": 1,
        "role_key": "admin",
        "can_request_membership": false,
        "can_cancel_membership_request": false,
        "can_join": false,
        "can_leave": false,
        "can_administer": true,
        "chat_stream_id": null,
        "post_stream_id": 212
      },
      "role": "Admin",
      "role_key": "admin"
    },
    {
      "group": {
        "id": 16,
        "name": "privatetest&grøup6",
        "html_name": "privatetest&amp;grøup6",
        "url": "https://socialcast.socialcast.test/groups/16-privatetestgr%C3%B8up6",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "privatetestgrøup6",
        "groupname": "privatetestgrøup6",
        "private": true,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/16-privatetestgr%C3%B8up6/messages_activity",
        "admin_ids": [
          35
        ],
        "description": null,
        "state": "active",
        "permission": "private",
        "group_type": "standard",
        "member_count": 1,
        "role_key": "admin",
        "can_request_membership": false,
        "can_cancel_membership_request": false,
        "can_join": false,
        "can_leave": false,
        "can_administer": true,
        "chat_stream_id": null,
        "post_stream_id": 208
      },
      "role": "Admin",
      "role_key": "admin"
    },
    {
      "group": {
        "id": 18,
        "name": "test&grøup10",
        "html_name": "test&amp;grøup10",
        "url": "https://socialcast.socialcast.test/groups/18-testgr%C3%B8up10",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "testgrøup10",
        "groupname": "testgrøup10",
        "private": false,
        "external_contributor": false,
        "chat_enabled": true,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/18-testgr%C3%B8up10/messages_activity",
        "admin_ids": [
          35
        ],
        "description": null,
        "state": "active",
        "permission": "public",
        "group_type": "standard",
        "member_count": 1,
        "role_key": "admin",
        "can_request_membership": false,
        "can_cancel_membership_request": false,
        "can_join": false,
        "can_leave": false,
        "can_administer": true,
        "chat_stream_id": 211,
        "post_stream_id": 210,
        "chats_last_viewed_at": 0,
        "unread_chats_count": 0
      },
      "role": "Admin",
      "role_key": "admin"
    },
    {
      "group": {
        "id": 13,
        "name": "test&grøup7",
        "html_name": "test&amp;grøup7",
        "url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up7",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "testgrøup7",
        "groupname": "testgrøup7",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/13-testgr%C3%B8up7/messages_activity",
        "admin_ids": [
          35,
          36
        ],
        "description": null,
        "state": "active",
        "permission": "public",
        "group_type": "standard",
        "member_count": 2,
        "role_key": "admin",
        "can_request_membership": false,
        "can_cancel_membership_request": false,
        "can_join": false,
        "can_leave": true,
        "can_administer": true,
        "chat_stream_id": null,
        "post_stream_id": 204
      },
      "role": "Admin",
      "role_key": "admin"
    },
    {
      "group": {
        "id": 14,
        "name": "test&grøup8",
        "html_name": "test&amp;grøup8",
        "url": "https://socialcast.socialcast.test/groups/14-testgr%C3%B8up8",
        "type": "Group",
        "avatars": {
          "is_system_default": true,
          "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
          "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
          "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
          "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
          "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
        },
        "username": "testgrøup8",
        "groupname": "testgrøup8",
        "private": false,
        "external_contributor": false,
        "chat_enabled": false,
        "post_enabled": true,
        "activity_url": "https://socialcast.socialcast.test/groups/14-testgr%C3%B8up8/messages_activity",
        "admin_ids": [
          30
        ],
        "description": null,
        "state": "active",
        "permission": "public",
        "group_type": "standard",
        "member_count": 2,
        "role_key": "member",
        "can_request_membership": false,
        "can_cancel_membership_request": false,
        "can_join": false,
        "can_leave": true,
        "can_administer": false,
        "chat_stream_id": null,
        "post_stream_id": 205
      },
      "role": "Member",
      "role_key": "member"
    }
  ]
}