Deleting an Organization VDC network using VMware Cloud Director API
search cancel

Deleting an Organization VDC network using VMware Cloud Director API

book

Article ID: 408438

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

This article lists the steps to delete an Organization VDC(OVDC) network in VMware Cloud Director(VCD) via API.

Environment

VMware Cloud Director 10.6.x

Resolution

Before you begin:

  • Verify that you are logged in as an organization administrator or a role with equivalent set of rights.
  • In the top navigation bar, click Networking.
  • On the Networks tab, click the name of the organization VDC network that you want to delete.
  • The URL will now get updated to have a network UUID of the following format: 

    https://vcd.example.com/tenant/<tenant-name>/domain-networking/org-networks/urn:vcloud:network:########-####-####-####-############/general

  • Note the string urn:vcloud:network:########-####-####-####-############

To carry out the delete via API,the below example is using API Explorer.

  1. Log into the Cloud Director API Explorer. 
    If using an API client (cURL or Postman), retrieve an Authorization token for the system administrator user as per the KB here:

    How to establish an API connection VMware Cloud Director

  2. Execute the GET request to retrieve the details of the network:
    GET https://{api_host}/cloudapi/1.0.0/orgVdcNetworks/{vdcNetworkId}
    Click 'Try it out' and specify the string noted from 'Before you begin' section : urn:vcloud:network:########-####-####-####-############



  3. Execute the DELETE request to retrieve the details of the network:
    DELETE https://{api_host}/cloudapi/1.0.0/orgVdcNetworks/{vdcNetworkId}
    Click 'Try it out' and specify the string noted from 'Before you begin' section : urn:vcloud:network:########-####-####-####-############
    Change the 'force' flag to 'true'.


  4. Run the GET request as pert Step 2 to verify the delete was complete. Also verify from the UI that the network is not present anymore.

Additional Information