November 23, 2017

Retrieves the user data for the VSIs in the account

The script gets the user metadata for a VSI in the account we make a simple
call the getVirtualGuests() in the SoftLayer_Virtual_Guest API service
and we set an object mask to get the information about the user data

Important manual pages:

Author: SoftLayer Technologies, Inc. <>
import SoftLayer

Client configuration
Your SoftLayer API username and key.
USERNAME = 'set me'
API_KEY = 'set me'

# Declaring the API client
client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']

# Adding the object mask to the call to get the information about the user data.
objectMask = "mask[userData]"

    # Retrieving our account's VSI records.
    result = accountService.getVirtualGuests(mask=objectMask)
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to list the tags faultCode=%s, faultString=%s"
          % (e.faultCode, e.faultString))


We would love to hear it
Open an issue