Skip to content
Ona Docs

ListMemberships

POST/gitpod.v1.GroupService/ListMemberships

Lists all memberships of a group.

Use this method to:

  • View all members of a group
  • Audit group membership

Examples

  • List group members:

    Shows all members of a specific group.

    groupId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    pagination:
      pageSize: 20

Authorization

All organization members can view group membership (transparency model).

Query ParametersExpand Collapse
token: optional string
pageSize: optional number
maximum100
minimum0
Body ParametersJSONExpand Collapse
filter: optional object { search }

filter contains options for filtering the list of memberships.

groupId: optional string
formatuuid
ReturnsExpand Collapse
members: optional array of GroupMembership { id, avatarUrl, groupId, 2 more }
id: optional string

Unique identifier for the group membership

formatuuid
avatarUrl: optional string

Subject’s avatar URL

groupId: optional string

Group identifier

formatuuid
name: optional string

Subject’s display name

subject: optional Subject { id, principal }

Subject (user, runner, environment, service account, etc.)

id: optional string

id is the UUID of the subject

formatuuid
principal: optional Principal

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"

ListMemberships

curl https://app.gitpod.io/api/gitpod.v1.GroupService/ListMemberships \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $GITPOD_API_KEY" \
    -d '{}'
{
  "members": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "avatarUrl": "avatarUrl",
      "groupId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "name": "name",
      "subject": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "principal": "PRINCIPAL_UNSPECIFIED"
      }
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}
Returns Examples
{
  "members": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "avatarUrl": "avatarUrl",
      "groupId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "name": "name",
      "subject": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "principal": "PRINCIPAL_UNSPECIFIED"
      }
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}