Pixelsilk API function to add a new role--requires the access-users permission
name: the name of the new role
description: the desciption of the new role
isHidden: true = is hidden; false = is not hidden
isSystemRole: true = is system role; false = not a system role
adminAccess: collection of admin access permissions

The function addRole returns void.

C# Example:
string name = "nameOfNewRole";
string description = "descriptionOfNewRole";
string isHidden = "false";
string isSystemRole = "false";
string[] adminAccess = {advanced-admin-access, access-libraries};
AddRole(name, description, isHidden, isSystemRole, adminAccess);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/addRole HTTP/1.1
Content-Length: 310
Content-Type: application/x-www-form-urlencoded
Cookie: auth=F62E595AD904...CD02948AE171

Request Data:
Unencoded Data:
   "description":"example role",

Url-encoded Data:

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=0F8F23D7A00B...08BC5704D48; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:

JavaScript Example:
Method Call:
pixelsilk2.addRole(input, callback);

Input Object:

Returned Data:

Back to Users »