systemgroup

Description

Provides methods to access and modify system groups.

Namespace:

systemgroup

Method: addOrRemoveAdmins

HTTP POST

Description:

Add or remove administrators to/from the given group. #product() and Organization administrators are granted access to groups within their organization by default; therefore, users with those roles should not be included in the array provided. Caller must be an organization administrator.

Parameters:

  • string sessionKey

  • string systemGroupName

  • string array loginName - User’s loginName

  • int add - 1 to add administrators, 0 to remove.

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: addOrRemoveSystems

HTTP POST

Description:

Add/remove the given servers to a system group.

Parameters:

  • string sessionKey

  • string systemGroupName

  • int array serverIds

  • boolean add - True to add to the group, False to remove.

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: create

HTTP POST

Description:

Create a new system group.

Parameters:

  • string sessionKey

  • string name - Name of the system group.

  • string description - Description of the system group.

Returns:

  • * struct server group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: delete

HTTP POST

Description:

Delete a system group.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: getDetails

HTTP GET

Description:

Retrieve details of a ServerGroup based on it’s id

Parameters:

  • string sessionKey

  • int systemGroupId

Returns:

  • * struct server group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: getDetails

HTTP GET

Description:

Retrieve details of a ServerGroup based on it’s name

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • * struct server group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: listActiveSystemsInGroup

HTTP GET

Description:

Lists active systems within a server group

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • int array server_id

Method: listAdministrators

HTTP GET

Description:

Returns the list of users who can administer the given group. Caller must be a system group admin or an organization administrator.

Parameters:

  • string sessionKey

  • string systemGroupName

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: listAllGroups

HTTP GET

Description:

Retrieve a list of system groups that are accessible by the logged in user.

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct server group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: listAssignedConfigChannels

HTTP GET

Description:

List all Configuration Channels assigned to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct configuration channel information

    • int "id"

    • int "orgId"

    • string "label"

    • string "name"

    • string "description"

    • struct "configChannelType"

  • struct configuration channel type information

    • int "id"

    • string "label"

    • string "name"

    • int "priority"

Available since API version: 25

Method: listAssignedFormuals

HTTP GET

Description:

List all Configuration Channels assigned to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct formula

    • string "name"

    • string "description"

    • string "formula_group"

Available since API version: 25

Method: listGroupsWithNoAssociatedAdmins

HTTP GET

Description:

Returns a list of system groups that do not have an administrator. (who is not an organization administrator, as they have implicit access to system groups) Caller must be an organization administrator.

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct server group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: listInactiveSystemsInGroup

HTTP GET

Description:

Lists inactive systems within a server group using a specified inactivity time.

Parameters:

  • string sessionKey

  • string systemGroupName

  • int daysInactive - Number of days a system must not check in to be considered inactive.

Returns:

  • int array server_id

Method: listInactiveSystemsInGroup

HTTP GET

Description:

Lists inactive systems within a server group using the default 1 day threshold.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • int array server_id

Method: listSystems

HTTP GET

Description:

Return a list of systems associated with this system group. User must have access to this system group.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct server details

    • int "id" - system ID

    • string "profile_name"

    • string "machine_id"

    • boolean "payg" - Whether the server instance is payg or not

    • string "minion_id"

    • string "base_entitlement" - system’s base entitlement label

    • string array "addon_entitlements" - system’s addon entitlements labels, currently only 'virtualization_host'

    • boolean "auto_update" - true if system has auto errata updates enabled

    • string "release" - the operating system release (i.e. 4AS, 5Server)

    • string "address1"

    • string "address2"

    • string "city"

    • string "state"

    • string "country"

    • string "building"

    • string "room"

    • string "rack"

    • string "description"

    • string "hostname"

    • dateTime.iso8601 "last_boot"

    • string "osa_status" - either 'unknown', 'offline', or 'online'

    • boolean "lock_status" - True indicates that the system is locked. False indicates that the system is unlocked.

    • string "virtualization" - virtualization type - for virtual guests only (optional)

    • string "contact_method" - one of the following:

      • default

      • ssh-push

      • ssh-push-tunnel

Method: listSystemsMinimal

HTTP GET

Description:

Return a list of systems associated with this system group. User must have access to this system group.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct system

    • int "id"

    • string "name"

    • dateTime.iso8601 "last_checkin" - last time server successfully checked in

    • dateTime.iso8601 "created" - server registration time

    • dateTime.iso8601 "last_boot" - last server boot time

    • int "extra_pkg_count" - number of packages not belonging to any assigned channel

    • int "outdated_pkg_count" - number of out-of-date packages

Method: scheduleApplyErrataToActive

HTTP POST

Description:

Schedules an action to apply errata updates to active systems from a group.

Parameters:

  • string sessionKey

  • string systemGroupName

  • int array errataIds

Returns:

  • int array actionId

Available since API version: 13.0

Method: scheduleApplyErrataToActive

HTTP POST

Description:

Schedules an action to apply errata updates to active systems from a group at a given date/time.

Parameters:

  • string sessionKey

  • string systemGroupName

  • int array errataIds

  • dateTime.iso8601 earliestOccurrence

Returns:

  • int array actionId

Available since API version: 13.0

Method: scheduleApplyErrataToActive

HTTP POST

Description:

Schedules an action to apply errata updates to active systems from a group at a given date/time.

Parameters:

  • string sessionKey

  • string systemGroupName

  • int array errataIds

  • dateTime.iso8601 earliestOccurrence

  • boolean onlyRelevant

Returns:

  • int array actionId

Available since API version: 24

Method: subscribeConfigChannel

HTTP POST

Description:

Subscribe given config channels to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

  • string array configChannelLabels

Returns:

  • 1 on success, exception on failure

Method: unsubscribeConfigChannel

HTTP POST

Description:

Unsubscribe given config channels to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

  • string array configChannelLabels

Returns:

  • 1 on success, exception on failure

Method: update

HTTP POST

Description:

Update an existing system group.

Parameters:

  • string sessionKey

  • string systemGroupName

  • string description

Returns:

  • * struct server group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"