user
Description
User namespace contains methods to access common user functions available from the web user interface.
Namespace:
user
Method: addAssignedSystemGroup
HTTP POST
Description:
Add system group to user’s list of assigned system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string sgName
-
boolean setDefault - Should system group also be added to user’s list of default system groups.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addAssignedSystemGroups
HTTP POST
Description:
Add system groups to user’s list of assigned system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string array sgNames - server group names
-
boolean setDefault - Should system groups also be added to user’s list of default system groups.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addDefaultSystemGroup
HTTP POST
Description:
Add system group to user’s list of default system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string name - server group name
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addDefaultSystemGroups
HTTP POST
Description:
Add system groups to user’s list of default system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string array sgNames - server group names
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: addRole
HTTP POST
Description:
Adds a role to a user.
Parameters:
-
string sessionKey
-
string login - User login name to update.
-
string role - Role label to add. Can be any of: satellite_admin, org_admin, channel_admin, config_admin, system_group_admin, or activation_key_admin.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: create
HTTP POST
Description:
Create a new user.
Parameters:
-
string sessionKey
-
string login - desired login name, will fail if already in use.
-
string password
-
string firstName
-
string lastName
-
string email - User’s e-mail address.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: create
HTTP POST
Description:
Create a new user.
Parameters:
-
string sessionKey
-
string login - desired login name, will fail if already in use.
-
string password
-
string firstName
-
string lastName
-
string email - User’s e-mail address.
-
int usePamAuth - 1 if you wish to use PAM authentication for this user, 0 otherwise.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: delete
HTTP POST
Description:
Delete a user.
Parameters:
-
string sessionKey
-
string login - User login name to delete.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: disable
HTTP POST
Description:
Disable a user.
Parameters:
-
string sessionKey
-
string login - User login name to disable.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: enable
HTTP POST
Description:
Enable a user.
Parameters:
-
string sessionKey
-
string login - User login name to enable.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: getCreateDefaultSystemGroup
HTTP GET
Description:
Returns the current value of the CreateDefaultSystemGroup setting. If True this will cause there to be a system group created (with the same name as the user) every time a new user is created, with the user automatically given permission to that system group and the system group being set as the default group for the user (so every time the user registers a system it will be placed in that system group by default). This can be useful if different users will administer different groups of servers in the same organization. Can only be called by an org_admin.
Parameters:
-
string sessionKey
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: getDetails
HTTP GET
Description:
Returns the details about a given user.
Parameters:
-
string sessionKey
-
string login - User’s login name.
Returns:
-
struct user details
-
string "first_names" - deprecated, use first_name
-
string "first_name"
-
string "last_name"
-
string "email"
-
int "org_id"
-
string "org_name"
-
string "prefix"
-
string "last_login_date"
-
string "created_date"
-
boolean "enabled" - true if user is enabled, false if the user is disabled
-
boolean "use_pam" - true if user is configured to use PAM authentication
-
boolean "read_only" - true if user is readonly
-
boolean "errata_notification" - true if errata e-mail notification is enabled for the user
-
Method: listAssignableRoles
HTTP GET
Description:
Returns a list of user roles that this user can assign to others.
Parameters:
-
string sessionKey
Returns:
-
string array (role label)
Method: listAssignedSystemGroups
HTTP GET
Description:
Returns the system groups that a user can administer.
Parameters:
-
string sessionKey
-
string login - User’s login name.
Returns:
-
array :
-
struct system group
-
int "id"
-
string "name"
-
string "description"
-
int "system_count"
-
int "org_id" - Organization ID for this system group.
-
-
Method: listDefaultSystemGroups
HTTP GET
Description:
Returns a user’s list of default system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
Returns:
-
array :
-
struct system group
-
int "id"
-
string "name"
-
string "description"
-
int "system_count"
-
int "org_id" - Organization ID for this system group.
-
-
Method: listRoles
HTTP GET
Description:
Returns a list of the user’s roles.
Parameters:
-
string sessionKey
-
string login - User’s login name.
Returns:
-
string array (role label)
Method: listUsers
HTTP GET
Description:
Returns a list of users in your organization.
Parameters:
-
string sessionKey
Returns:
-
array :
-
struct user
-
int "id"
-
string "login"
-
string "login_uc" - upper case version of the login
-
boolean "enabled" - true if user is enabled, false if the user is disabled
-
Method: removeAssignedSystemGroup
HTTP POST
Description:
Remove system group from the user’s list of assigned system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string sgName - server group name
-
boolean setDefault - Should system group also be removed from the user’s list of default system groups.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeAssignedSystemGroups
HTTP POST
Description:
Remove system groups from a user’s list of assigned system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string array sgNames - server group names
-
boolean setDefault - Should system groups also be removed from the user’s list of default system groups.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeDefaultSystemGroup
HTTP POST
Description:
Remove a system group from user’s list of default system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string sgName - server group name
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeDefaultSystemGroups
HTTP POST
Description:
Remove system groups from a user’s list of default system groups.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
string array sgNames - server group names
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: removeRole
HTTP POST
Description:
Remove a role from a user.
Parameters:
-
string sessionKey
-
string login - User login name to update.
-
string role - Role label to remove. Can be any of: satellite_admin, org_admin, channel_admin, config_admin, system_group_admin, or activation_key_admin.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: setCreateDefaultSystemGroup
HTTP POST
Description:
Sets the value of the createDefaultSystemGroup setting. If True this will cause there to be a system group created (with the same name as the user) every time a new user is created, with the user automatically given permission to that system group and the system group being set as the default group for the user (so every time the user registers a system it will be placed in that system group by default). This can be useful if different users will administer different groups of servers in the same organization. Can only be called by an org_admin.
Parameters:
-
string sessionKey
-
boolean createDefaultSystemGroup - true if we should automatically create system groups, false otherwise.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: setDetails
HTTP POST
Description:
Updates the details of a user.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
struct details
-
string "first_names" - deprecated, use first_name
-
string "first_name"
-
string "last_name"
-
string "email"
-
string "prefix"
-
string "password"
-
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: setErrataNotifications
HTTP POST
Description:
Enables/disables errata mail notifications for a specific user.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
boolean value - True for enabling errata notifications, False for disabling
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: setReadOnly
HTTP POST
Description:
Sets whether the target user should have only read-only API access or standard full scale access.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
boolean readOnly - Sets whether the target user should have only read-only API access or standard full scale access.
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: usePamAuthentication
HTTP POST
Description:
Toggles whether or not a user uses PAM authentication or basic #product() authentication.
Parameters:
-
string sessionKey
-
string login - User’s login name.
-
int val
-
1 to enable PAM authentication
-
0 to disable.
-
Returns:
-
int - 1 on success, exception thrown otherwise.