GroupMembership

A membership to a group. A user ID can be used in place of a membership ID.

Thuộc Tính

pathstring

The resource path of the group membership.

Format: groups/{group_id}/memberships/{group_membership_id}.

createTimestring
Chỉ Xuất

The timestamp when the group membership was created. Chuỗi này được định dạng là Dấu thời gian.

updateTimestring
Chỉ Xuất

The timestamp when the group membership was last updated. Chuỗi này được định dạng là Dấu thời gian.

userstring
Bất Biến

The resource path of a member of the group.

rolestring

The resource path for the role of the group member.

URL Cơ Sở

https://apis.roblox.com
Tài nguyên GroupMembership

{
"path": "groups/123/memberships/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/21557",
"role": "groups/7/roles/99513316"
}

GroupMembership

List Group Memberships
Bản Beta

GET /cloud/v2/groups/{group_id}/memberships

List group members in a group.

Yêu CầuTham Số Đường Dẫn
group_idstring
Bắt Buộc

The group ID.

Tham Số Truy Vấn
maxPageSizenumber

The maximum number of group memberships to return. The service might return fewer than this value. If unspecified, at most 10 group memberships are returned. The maximum value is 100 and higher values are set to 100.

pageTokenstring

A page token, received from a previous call, to retrieve a subsequent page.

When paginating, all other parameters provided to the subsequent call must match the call that provided the page token.

filterstring

This field may be set in order to filter the resources returned.

See the filtering documentation for more information.

Phản Hồi

A list of GroupMemberships in the parent collection.

groupMembershipsarray<GroupMembership>

The GroupMemberships from the specified Group.

nextPageTokenstring

A token that you can send as a pageToken parameter to retrieve the next page. If this field is omitted, there are no subsequent pages.

GET /cloud/v2/groups/{group_id}/memberships

curl -L -X GET 'https://apis.roblox.com/cloud/v2/groups/{group_id}/memberships?maxPageSize=10&pageToken={string}&filter={string}' \
-H 'x-api-key: {your-api-key}'
Phản Hồi

{
"groupMemberships": [
{
"path": "groups/123/memberships/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/21557",
"role": "groups/7/roles/99513316"
}
],
"nextPageToken": "string"
}

GroupMembership

Update Group Membership
Bản Beta

PATCH /cloud/v2/groups/{group_id}/memberships/{membership_id}

Updates the group membership for a particular group member. This action requires the requester to be able to manage lower ranked members. Guest or Owner ranks cannot be assigned, and a requester cannot change their own rank.

Phạm Vi
group:write
Yêu CầuTham Số Đường Dẫn
group_idstring
Bắt Buộc

The group ID.

membership_idstring
Bắt Buộc

The membership ID.

Yêu Cầu Cơ ThểGroupMembership
Phản HồiGroupMembership
PATCH /cloud/v2/groups/{group_id}/memberships/{membership_id}

curl -L -X PATCH 'https://apis.roblox.com/cloud/v2/groups/{group_id}/memberships/{membership_id}' \
-H 'x-api-key: {your-api-key}' \
-H 'Content-Type: application/json' \
--data '{
"role": "groups/7/roles/99513316"
}'
Phản Hồi

{
"path": "groups/123/memberships/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"user": "users/21557",
"role": "groups/7/roles/99513316"
}