deleteRole()

Pixelsilk API function to delete a role--requires the access-users permission
Parameters:
roleName: the name of the role

Output:
The function deleteRole returns void.

C# Example:
string roleName = "nameOfRole";
DeleteRole(roleName);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/deleteRole HTTP/1.1
HOST: www.example.com
Content-Length: 94
Content-Type: application/x-www-form-urlencoded
Cookie: auth=6098A04E0273...9A52226B82C8

Request Data:
Unencoded Data:
json={
   "roleName":"Exemplar"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=57CF6D9543F2...C10162E3747; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

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

Input Object:
{
    roleName:"Devon"
}

Returned Data:
{}

Back to Users »