NSX for vSphere 6.4.4 and 6.4.5
The current behavior is a bug which has been fixed in the next release
This issue is resolved in NSX for vSphere 6.4.6
GET https://<NSX-manager-IP>/api/4.0/edges/<edge-id>/routing/config/bgp
<bgp>
<enabled>true</enabled>
<localAS>65004</localAS>
<localASNumber>65004</localASNumber>
<bgpNeighbours>
<bgpNeighbour>
</bgpNeighbour>
</bgpNeighbours>
<redistribution>
<enabled>true</enabled>
<rules>
<rule>
<id>0</id>
<from>
<ospf>true</ospf>
<bgp>false</bgp>
<static>true</static>
<connected>true</connected>
</from>
<action>permit</action>
</rule>
</rules>
</redistribution>
<gracefulRestart>false</gracefulRestart>
<defaultOriginate>true</defaultOriginate>
</bgp>
PUT https://<NSX-manager-IP>/api/4.0/edges/<edge-id>/routing/config/bgp