2

I need to access deleted VSI's to find their ID. I have the hostnames of the devices that were deleted. In essence, I need to take the hostnames of the deleted VSI's and find their ID. Here is my code (Python):

import SoftLayer
import json

USERNAME = 'set me'
API_KEY = 'set me'


client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
accountService = client['SoftLayer_Account']
objectMask= "mask[hostname,id]"

try:

 response = accountService.getallTopLevelBillingItems(mask=objectMask)
 print(json.dumps(response, sort_keys=True, indent=2, separators=(',', ': ')))

except:

 print("Unable to get the VSIs")`
Squick
  • 41
  • 4

1 Answers1

1

There is no way to retrieve the deleted VSIs using the SLDN API once they were cancelled.

I'm not sure but you can try by submitting a ticket and request that information if you need those IDs for logging purposes

Albert Camacho
  • 1,129
  • 1
  • 7
  • 13
  • Is there any way to print out the deleted vsi information without using the API? – Squick Nov 01 '18 at 13:21
  • Sorry, my previous answer was a little incomplete, once the vsi are deleted the users cannot access them or their information by any public means such as the API or GUI, the only way I can think you can get that information is by sending a ticket to SoftLayer – Albert Camacho Nov 01 '18 at 13:57