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)Â
Â

