DELETE API call to remove NSX VIBs from ESXi host gives 200 OK, but does not trigger NSX uninstall
DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX-UUID>?unprepare_host=true
Force DELETE API call to remove the NSX host object from the NSX database without uninstalling the NSX VIBs from the host gives 200 OK, but does not trigger a force removal of the NSX Host object from the NSX database
DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=false&force=true
Logs under /var/log/proxy/localhost_access_log.txt show several attempts being made to send the API call in question, but NSX Host object status remains unchanged in the NSX UI:
2025-08-27T16:41:31.760Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=true HTTP/1.1" 200 - 0 0
2025-08-27T16:47:20.630Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=false&force=true HTTP/1.1" 200 - 0 0
2025-08-27T17:08:58.113Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=true HTTP/1.1" 200 - 1 0
2025-08-27T17:14:47.199Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=false&force=true HTTP/1.1" 200 - 1 0
2025-08-27T17:37:06.522Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=true HTTP/1.1" 200 - 0 0
2025-08-27T17:42:56.216Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=false&force=true HTTP/1.1" 200 - 0 0
2025-08-27T18:05:01.595Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=true HTTP/1.1" 200 - 0 0
2025-08-27T18:10:50.448Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=false&force=true HTTP/1.1" 200 - 1 1
2025-08-27T18:32:59.223Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=true HTTP/1.1" 200 - 0 0
2025-08-27T18:38:49.178Z localhost - "DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<Host-TN-NSX UUID>?unprepare_host=false&force=true HTTP/1.1" 200 - 1 1
VMware NSX 4.x
NSX API URI path does not match NSX database's intent path defined in the key field of the HostTransportNode table for the host object.
To view the host object in question:
From root mode on any NSX Manager Appliance:
root@nsx-mngr:~# corfu_tool_runner.py -o showTable -n nsx -t HostTransportNode | grep <host-name> -B 10
To craft your API call, use the path defined from the key field in your delete API call after running the above command:
DELETE /policy/api/v1/infra/sites/default/enforcement-points/default/host-transport-nodes/<hostname>-<compute-manager-UUID>host-#####?unprepare_host=true
To force delete the NSX Host from the NSX database without uninstalling the NSX VIBs/bits: