VMware NSX

 View Only
  • 1.  NSX API for modifying a Loadbalancer virtual server

    Posted Sep 21, 2015 02:55 PM

    Hello.

    I am using NSX APIs to add load balancer pools and redirect connections using application rules.

    There is one LB virtual server. Based on the application rule, it will redirect to different pools.

    I am able to use the APIs to add pools, application rules.

    But I can't find any API to modify the virtual server to append the rule to it.

    Ideally there should be an POST operation on https://nsxmgr/4.0/edges/{id}/loadbalancer/config/virtualservers/{vsid}

    But it is not there in the NSX 6.1 API guide. And when I tried to do a POST, getting a 405 error (POST not supported).

    Any help on how to modify a LB virtual server through API is very much appreciated.


    Thanks



  • 2.  RE: NSX API for modifying a Loadbalancer virtual server
    Best Answer

    Broadcom Employee
    Posted Sep 21, 2015 03:00 PM

    Modification of objects are with the HTTP method "PUT".

    Creation of objects are with the HTTP method "POST".

    I understand you try to modify an existing VIP, so you should try with the HTTP method "PUT".

    Can you try again?

    If you're still facing issue, can you send the exact URL + payload you're sending.

    Thanks,

    Dimitri



  • 3.  RE: NSX API for modifying a Loadbalancer virtual server

    Posted Sep 21, 2015 06:28 PM

    So stupid of me. Didn't even thought about trying with PUT.

    PUT worked. Thanks