Well, I never found any documentation on the API, but once I found the CORRECT API, it became pretty straight-forward. Here is a sample of some code for anyone else out there that may need to do something similar:
// Instantiate the manager API
UserRoleManager sm = new UserRoleManager();
// Connect to environment
sm.Connection = sm.CreateConnection();
sm.Connection.Open(
">host server connection string here, can get it from object browser]");
// END connect to environment
// List all roles
Rolel] roles = sm.GetRoles();
foreach (Role role in roles)
{
System.Diagnostics.
Debug.WriteLine(role.Name);
System.Diagnostics.
Debug.WriteLine(" " + role.GetData());
}
// END list all roles
// Add a new role
Role newRole = new Role("Test");
newRole.LoadData(
"<role name="Test" guid="" + newRole.Guid + "" description="" isdynamic="false"><include><users><user name="K2:BSDv-tbyrne" /></users><groups /><smartobjects /></include><exclude><users /><groups /><smartobjects /></exclude></role>");
sm.CreateRole(newRole);
// END add new role
// Append a '7' to the first role's description (update test)
Role updateRole = rolese0];
updateRole.Description +=
"7";
sm.UpdateRole(updateRole);
// END Append a '7' to the first role's description (update test)
sm.Connection.Close();
SourceCode.Security.UserRoleManager.Management