Get Group Role documentation shows incorrect response

curl -L -X GET 'https://apis.roblox.com/cloud/v2/groups/{group_id}/roles/{role_id}' \ -H 'x-api-key: {your-api-key}'
According to the docs this endpoint should return:

{
  "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
  }
}

but in fact returns:

{
    "path": "groups/6393012/roles/41246525",
    "id": "41246525",
    "displayName": "factor",
    "rank": 255
}

Expected behavior

Documentation should show the accurate response.

This may be more of a API issue. The list group roles endpoint properly returns an array of GroupRole objects. I would expect getting a specific group role to return the same GroupRole object.

But seeing as it doesn’t, for now it seems to be a documentation issue.

Hi factor! The response you received likely was different from the one in the docs because of your role in the group. As mentioned in the doc page, createTime and updateTime are only visible to group owners, and memberCount and permissions aren’t returned for guest roles.

1 Like

The example I used in the post is retrieving a non-guest role and I am the owner of the group.

This bug is incorrectly marked as fixed

https://apis.roblox.com/cloud/v2/groups/5398182/roles/35799533
Returns:

{
    "path": "groups/5398182/roles/35799533",
    "id": "35799533",
    "displayName": "Game Developer",
    "rank": 254
}

https://apis.roblox.com/cloud/v2/groups/5398182/roles
Returns:

{
    "groupRoles": [
        {
            "path": "groups/5398182/roles/35799532",
            "createTime": "2019-12-26T13:36:21.380Z",
            "updateTime": "2019-12-26T13:41:17.283Z",
            "id": "35799532",
            "displayName": "Lead Developer",
            "description": "The group's owner.",
            "rank": 255,
            "memberCount": 1,
            "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,
                "manageBlockedWords": true,
                "viewBlockedWords": true,
                "bypassSlowMode": true
            }
        },
        {
            "path": "groups/5398182/roles/35799533",
            "createTime": "2019-12-26T13:36:21.380Z",
            "updateTime": "2023-01-31T20:16:41.247Z",
            "id": "35799533",
            "displayName": "Game Developer",
            "description": "A group administrator.",
            "rank": 254,
            "memberCount": 1,
            "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,
...

This behavior seems pretty strange. Returning a list of all roles returns the full object for every role, returning a specific role pretty much gives me a truncated object… behavior should probably be flipped.

3 Likes