GroupRole

A configurable property to grant specific privileges for members within a group.

คุณลักษณะ

pathstring

The resource path of the group role.

Format: groups/{group_id}/roles/{group_role_id}.

createTimestring
เอาต์พุตเท่านั้น

The timestamp for when the group role was last updated.

Visible only to owners of the group. สตริงนี้มีรูปแบบประทับเวลา

updateTimestring
เอาต์พุตเท่านั้น

The timestamp when the group role was last updated.

Visible only to owners of the group. สตริงนี้มีรูปแบบประทับเวลา

idstring
เอาต์พุตเท่านั้น

A unique ID that identifies a role.

Distinct from a role's rank, which is only unique within the group.

displayNamestring

The name of the role.

Has a maximum limit of 100 characters. Names above the limit are rejected.

descriptionstring

The description of the role.

Has a maximum limit of 1000 characters. Strings above the limit are rejected. Visible only to owners of the group.

ranknumber

The rank of the role.

The minimum value is 0. The maximum value is 255.

memberCountnumber
เอาต์พุตเท่านั้น

Total number of members within a role.

This field is not returned for guest roles.

permissionsobject

The permissions granted for this role.

This value is populated based on the read scope and role of the authorized user or API key creator. If the user or creator is the owner of the parent group, they are able to view all role permissions in the group. If the user or creator is a member of the parent group, they are able to view their role's permissions in the group. Anyone can view guest permissions. In the case that someone can't view the permissions, this field is not returned.

URL หลัก

https://apis.roblox.com
แหล่งข้อมูล GroupRole

{
"path": "groups/123/roles/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"id": "200",
"displayName": "Member",
"description": "This is a description for the role",
"rank": 1,
"memberCount": 10223136,
"permissions": {
"viewWallPosts": true,
"createWallPosts": true,
"deleteWallPosts": true,
"viewGroupShout": true,
"createGroupShout": true,
"changeRank": true,
"acceptRequests": true,
"exileMembers": true,
"manageRelationships": true,
"viewAuditLog": true,
"spendGroupFunds": true,
"advertiseGroup": true,
"createAvatarItems": true,
"manageAvatarItems": true,
"manageGroupUniverses": true,
"viewUniverseAnalytics": true,
"createApiKeys": true,
"manageApiKeys": true,
"banMembers": true,
"viewForums": true,
"manageCategories": true,
"createPosts": true,
"lockPosts": true,
"pinPosts": true,
"removePosts": true,
"createComments": true,
"removeComments": true
}
}

GroupRole

List Group Roles
เวอร์ชัน Beta

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

List roles in a group.

The permissions field for roles is viewable based on the requester's access and scopes.

Permissions for the guest role are always visible - a scope is not needed.

If the requester is a member of the group and has the group:read scope, permissions in their role are visible.

If the requester is the owner of the group and has the group:read scope, permissions in all roles are visible.

คำขอพารามิเตอร์เส้นทาง
group_idstring
จำเป็นต้องมี

The group ID.

พารามิเตอร์คิวรี
maxPageSizenumber

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

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.

การตอบกลับ

A list of GroupRoles in the parent collection.

groupRolesarray<GroupRole>

The GroupRoles 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}/roles

curl -L -X GET 'https://apis.roblox.com/cloud/v2/groups/{group_id}/roles?maxPageSize=10&pageToken={string}' \
-H 'x-api-key: {your-api-key}'
การตอบกลับ

{
"groupRoles": [
{
"path": "groups/123/roles/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"id": "200",
"displayName": "Member",
"description": "This is a description for the role",
"rank": 1,
"memberCount": 10223136,
"permissions": {
"viewWallPosts": true,
"createWallPosts": true,
"deleteWallPosts": true,
"viewGroupShout": true,
"createGroupShout": true,
"changeRank": true,
"acceptRequests": true,
"exileMembers": true,
"manageRelationships": true,
"viewAuditLog": true,
"spendGroupFunds": true,
"advertiseGroup": true,
"createAvatarItems": true,
"manageAvatarItems": true,
"manageGroupUniverses": true,
"viewUniverseAnalytics": true,
"createApiKeys": true,
"manageApiKeys": true,
"banMembers": true,
"viewForums": true,
"manageCategories": true,
"createPosts": true,
"lockPosts": true,
"pinPosts": true,
"removePosts": true,
"createComments": true,
"removeComments": true
}
}
],
"nextPageToken": "string"
}

GroupRole

Get Group Role
เวอร์ชัน Beta

GET /cloud/v2/groups/{group_id}/roles/{role_id}

Get the group role

คำขอพารามิเตอร์เส้นทาง
group_idstring
จำเป็นต้องมี

The group ID.

role_idstring
จำเป็นต้องมี

The role ID.

การตอบกลับGroupRole
GET /cloud/v2/groups/{group_id}/roles/{role_id}

curl -L -X GET 'https://apis.roblox.com/cloud/v2/groups/{group_id}/roles/{role_id}' \
-H 'x-api-key: {your-api-key}'
การตอบกลับ

{
"path": "groups/123/roles/123",
"createTime": "2023-07-05T12:34:56Z",
"updateTime": "2023-07-05T12:34:56Z",
"id": "200",
"displayName": "Member",
"description": "This is a description for the role",
"rank": 1,
"memberCount": 10223136,
"permissions": {
"viewWallPosts": true,
"createWallPosts": true,
"deleteWallPosts": true,
"viewGroupShout": true,
"createGroupShout": true,
"changeRank": true,
"acceptRequests": true,
"exileMembers": true,
"manageRelationships": true,
"viewAuditLog": true,
"spendGroupFunds": true,
"advertiseGroup": true,
"createAvatarItems": true,
"manageAvatarItems": true,
"manageGroupUniverses": true,
"viewUniverseAnalytics": true,
"createApiKeys": true,
"manageApiKeys": true,
"banMembers": true,
"viewForums": true,
"manageCategories": true,
"createPosts": true,
"lockPosts": true,
"pinPosts": true,
"removePosts": true,
"createComments": true,
"removeComments": true
}
}