VMware Networking Community
sivakumarss
Enthusiast
Enthusiast
Jump to solution

NSX API for modifying a Loadbalancer virtual server

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

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ddesmidt
VMware Employee
VMware Employee
Jump to solution

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

View solution in original post

0 Kudos
2 Replies
ddesmidt
VMware Employee
VMware Employee
Jump to solution

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

0 Kudos
sivakumarss
Enthusiast
Enthusiast
Jump to solution

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

PUT worked. Thanks

0 Kudos