Manage Applications

    Get group membership

    get
    https://api.box.com/2.0
    /group_memberships/:group_membership_id

    Retrieves a specific group membership.

    Request

    application/json

    Path Parameters

    stringin pathrequired
    434534

    The ID of the group membership.

    Query Parameters

    string arrayin queryoptional
    id,type,name

    A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

    Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

    Response

    application/jsonMembership

    Returns the group membership object.

    You can now try out some of our APIs live, right here in the documentation.
    Log In

    Request Example

    cURL
    curl -X GET https://api.box.com/2.0/group_memberships/434534 \
         -H "Authorization: Bearer <ACCESS_TOKEN>"
    Java
    BoxGroupMembership membership = new BoxGroupMembership(api, id);
    BoxGroupMembership.Info groupMembershipInfo = membership.getInfo();
    Python
    membership_id = '11111'
    membership = client.group_membership(membership_id).get()
    print('User "{0}" is a member of the {1} group'.format(membership.user.name, membership.group.name))
    Node
    client.groups.getMembership('33333')
    	.then(membership => {
    		/* membership -> {
    			type: 'group_membership',
    			id: '33333',
    			user: 
    			{ type: 'user',
    				id: '22222',
    				name: 'Alison Wonderland',
    				login: 'alice@example.com' },
    			group: { type: 'group', id: '11111', name: 'Employees' },
    			role: 'member',
    			configurable_permissions: 
    			{ can_run_reports: false,
    				can_instant_login: false,
    				can_create_accounts: false,
    				can_edit_accounts: false },
    			created_at: '2013-05-16T15:27:57-07:00',
    			modified_at: '2013-05-16T15:27:57-07:00' }
    		*/
    	});

    Response Example

    {
      "id": 11446498,
      "type": "group_membership",
      "user": {
        "id": 11446498,
        "type": "user",
        "name": "Aaron Levie",
        "login": "ceo@example.com"
      },
      "group": {
        "id": 11446498,
        "type": "group",
        "name": "Support",
        "group_type": "managed_group"
      },
      "role": "member",
      "created_at": "2012-12-12T10:53:43-08:00",
      "modified_at": "2012-12-12T10:53:43-08:00"
    }