POST api.ashx/v3/permissions.{json|xml}
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
ApplicationId | Guid | Request Body | Application Id where the permission is being granted. If neither Group Id nor Application Id is provided, the permisison will be set to the site root. | Optional | ||
GroupId | int | Request Body | Group Id where the permission is being set. If neither Group Id nor Application Id is provided, the permisison will be set to the site root. | Optional | ||
IsAllowed | bool | Request Body | Whether the role should be allowed the permission or not. | Required | ||
PermissionId | Guid | Request Body | Permission Id being set for the role | Required | ||
RoleId | int | Request Body | Role Id being set for the permission. | Required |
Example Requests
Widget Javascript
jQuery.telligent.evolution.post({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v3/permissions.json', data: { 'IsAllowed': 'True', 'PermissionId': '49fec544-6df7-4a82-872b-f8be586d5e9e', 'RoleId': '6' } }).then(function(response) { // use response });
Example Responses
JSON
{ "Permission": { "Name": "name", "Data": {}, "Errors": [ "string", "string" ] }, "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Permission> <Name>name</Name> <Data /> <Errors> <string>string</string> <string>string</string> </Errors> </Permission> <Errors> <Message>string</Message> <Message>string</Message> </Errors> </Response>