Documentation

UpdateRole

Updates metadata about a role.

Request Details

Updates the role name. Returns information about whether the update was successful.

UpdateGroupRoleRequest
Request Properties
ExpectedProfileVersion int32

Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any other clients since the version you last loaded.

Group (required) EntityKey

The identifier of the group

RoleId String

ID of the role to update. Role IDs must be between 1 and 64 characters long.

RoleName (required) String

The new name of the role

POST https://{{TitleID}}.playfabapi.com/Group/UpdateRole
    Content-Type: application/json
{
  "Group": {
    "Id": "ABC1234ABC"
  },
  "RoleId": "ABC1234DEF",
  "RoleName": "My New Role Name",
  "ExpectedProfileVersion": 17
}
        

Response Details

UpdateGroupRoleResponse
Result Properties
OperationReason String

Optional reason to explain why the operation was the result that it was.

ProfileVersion (required) int32

New version of the role data.

SetResult OperationTypes

Indicates which operation was completed, either Created, Updated, Deleted or None.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "ProfileVersion": 18,
    "SetResult": "Updated"
  }
}

Authentication

EntityToken

Possible Error Codes

Name Code
NotAuthenticated 1074
NotAuthorized 1089
RoleDoesNotExist 1358