Method: groups.memberships.searchDirectGroups

Searches direct groups of a member.

HTTP request

GET https://cloudidentity.googleapis.com/v1beta1/{parent=groups/*}/memberships:searchDirectGroups

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Resource name of the group to search transitive memberships in.

Format: groups/{group_id}, where group_id is always '-' as this API will search across all groups for a given member.

Query parameters

Parameters
query

string

Required. A CEL expression that MUST include member specification AND label(s).

Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. Identity-mapped groups are uniquely identified by both a member_key_id and a member_key_namespace, which requires an additional query input: member_key_namespace.

Example query: member_key_id == 'member_key_id_value' && 'label_value' in labels

pageSize

integer

The default page size is 200 (max 1000).

pageToken

string

The next_page_token value returned from a previous list request, if any.

orderBy

string

The ordering of membership relation for the display name or email in the response. The syntax for this field can be found at https://cloud.google.com/apis/design/design_patterns#sorting_order. Example: Sort by the ascending display name: order_by="group_name" or order_by="group_name asc". Sort by the descending display name: order_by="group_name desc". Sort by the ascending group key: order_by="group_key" or order_by="group_key asc". Sort by the descending group key: order_by="group_key desc".

Request body

The request body must be empty.

Response body

The response message for MembershipsService.SearchDirectGroups.

If successful, the response body contains data with the following structure:

JSON representation
{
  "memberships": [
    {
      object (MembershipRelation)
    }
  ],
  "nextPageToken": string
}
Fields
memberships[]

object (MembershipRelation)

List of direct groups satisfying the query.

nextPageToken

string

Token to retrieve the next page of results, or empty if there are no more results available for listing.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-identity.groups.readonly
  • https://www.googleapis.com/auth/cloud-identity.groups
  • https://www.googleapis.com/auth/cloud-identity
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

MembershipRelation

Message containing membership relation.

JSON representation
{
  "membership": string,
  "roles": [
    {
      object (MembershipRole)
    }
  ],
  "group": string,
  "groupKey": {
    object (EntityKey)
  },
  "displayName": string,
  "labels": {
    string: string,
    ...
  },
  "description": string
}
Fields
membership

string

The resource name of the Membership.

Shall be of the form groups/{group_id}/memberships/{membership_id}.

roles[]

object (MembershipRole)

The MembershipRoles that apply to the Membership.

group

string

The resource name of the Group.

Shall be of the form groups/{group_id}.

groupKey

object (EntityKey)

The EntityKey of the Group.

displayName

string

The display name of the Group.

labels

map (key: string, value: string)

One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

description

string

An extended description to help users determine the purpose of a Group.