DELETE https://<nsx-manager-fqdn>/api/v1/infra/ip-blocks/<IP block name>IP block cannot be deleted as it has allocated subnets.VMware NSX
This error is shown because the IP block has subnets allocated from it. The system prevents the deletion of an IP block that contains active subnets.
NSX prevents the deletion of the parent IP block object while these child subnet objects exist.
To resolve this issue, you must delete the allocated subnets using the NSX API before deleting the IP block.
DELETE https://<nsx-mgr>/api/v1/pools/ip-subnets/{subnet-id}