POST (Header:PUT) api.ashx/v2/roles/{roleid}.{json|xml}
UPDATE a role.
Scopes
Security(Roles and Permissions) › Modify Roles security.roles.modify
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
Description | string | Description | Required | |||
GroupId | int? | Group Id | Optional | |||
IsPrivate | bool? | Whether the role is private or not. Private roles are only viewable by members with the Manage Membership permission. | Optional | |||
Name | string | Name | Required | |||
RoleId | int | Role Id | Required |
Example Requests
Widget Javascript
jQuery.telligent.evolution.put({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/roles/{roleid}.json', data: { 'roleid': '6', 'Description': 'description', 'Name': 'name' } }).then(function(response) { // use response });
Example Responses
JSON
{ "Role": { "Id": 6, "RoleId": "49fec544-6df7-4a82-872b-f8be586d5e9e", "Name": "name", "Description": "description", "GroupId": 25, "IsSystemRole": true, "ImageUrl": "", "AvatarUrl": "avatarurl", "IsPrivate": true, "PermissionEntries": [ { "Id": "9f5a6721-639d-4e1d-ab6a-ce63b7750f46", "PermissionId": "permissionid", "Name": "name", "IsAllowed": true, "IsImmediate": true }, { "Id": "fe65240b-044c-4292-9946-f10e0361ecff", "PermissionId": "permissionid", "Name": "name", "IsAllowed": true, "IsImmediate": true } ] }, "Info": [ "string", "string" ], "Warnings": [ "string", "string" ], "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Info> <Message>string</Message> <Message>string</Message> </Info> <Warnings> <Message>string</Message> <Message>string</Message> </Warnings> <Errors> <Message>string</Message> <Message>string</Message> </Errors> <Role> <Id>6</Id> <RoleId>49fec544-6df7-4a82-872b-f8be586d5e9e</RoleId> <Name>name</Name> <Description>description</Description> <GroupId>25</GroupId> <IsSystemRole>true</IsSystemRole> <AvatarUrl>avatarurl</AvatarUrl> <IsPrivate>true</IsPrivate> <PermissionEntries> <PermissionEntry> <Id>9f5a6721-639d-4e1d-ab6a-ce63b7750f46</Id> <PermissionId>permissionid</PermissionId> <Name>name</Name> <IsAllowed>true</IsAllowed> <IsImmediate>true</IsImmediate> </PermissionEntry> <PermissionEntry> <Id>fe65240b-044c-4292-9946-f10e0361ecff</Id> <PermissionId>permissionid</PermissionId> <Name>name</Name> <IsAllowed>true</IsAllowed> <IsImmediate>true</IsImmediate> </PermissionEntry> </PermissionEntries> </Role> </Response>