Skip to main content
Solved

Delete manually added VMs from content via api

  • May 13, 2024
  • 1 reply
  • 36 views

Forum|alt.badge.img+7

I have used the apis to retire and delete the VMs but since the VMs are added everytime manually in the subclient, I would like to use the API to remove it from the content as well. I used the below mentioned API and it deletes the complete content. I just want one VM to be removed.

import requests


url = "https://commandcenterhostname/commandcenter/api/Subclient/100/content"

payload = json.dumps({
  "children": [
    {
      "allOrAnyChildren": True,
      "displayName": "test",
      "equalsOrNotEquals": True,
      "name": "503a1c32-6616-10ds-k9l8-130535306451",
      "path": ""
    }
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '*token*'
}

response = requests.request("PUT", url, headers=headers, data=payload, verify=False)

print(response.text)

 

 

Best answer by Albert Williams

Hello @RandomCustomer 

Thanks for the question, could this link contain the fix for you?

https://api.commvault.com/docs/SP34/api/cv/VirtualizationOperations/update-subclient-virtual-machine-content

Kind regards
Albert Williams

View original
Did this answer your question?

1 reply

Forum|alt.badge.img+15

Hello @RandomCustomer 

Thanks for the question, could this link contain the fix for you?

https://api.commvault.com/docs/SP34/api/cv/VirtualizationOperations/update-subclient-virtual-machine-content

Kind regards
Albert Williams


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings