VMware {code} Community
trevordavismsft
Enthusiast
Enthusiast

NSX-T API For Attaching DHCP Server to Logical Switch

I have figured out how to do everything via API for DHCP except how to attach the DHCP server to the logical switch ... any guidance would be appreciated!

Thanks!

Tags (2)
0 Kudos
1 Reply
doskiran
Enthusiast
Enthusiast

NSX-T API to Attach DHCP Server to Logical Switch:
------------------------------------------------------------------

POST https://<nsx-mgr>/api/v1/logical-ports

{
     "logical_switch_id":<Id of the Logical switch>,
     "attachment":{
         "attachment_type":"DHCP_SERVICE",
         "id":<DHCP_SERVER_ID>
      },
     "admin_state":"UP"
}

0 Kudos