VMware Networking Community
DanyG01
Enthusiast
Enthusiast
Jump to solution

Can you explain me why I don't get the same result (vSphere Web Client vs API)

Hi,

When I create a new Logical Switches from the vSphereWebClient/Networking&Security/LogicalSwitches

I don't see it from a RESTClient «GET nsx_url/api/2.0/vdn/virtualwires»

Why ?

Thanks

0 Kudos
1 Solution

Accepted Solutions
DaleCoghlan
VMware Employee
VMware Employee
Jump to solution

How many logical switches do you have in your environment. That particular API call you are using has a paging function and by default will only return the first 20 objects.

From the NSX 6.2 API Guide

where ?pagesize=XX&startindex=YY specifies the query results to larger pages. The default pagesize is 20 and the default startindex is 0.

View solution in original post

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

How many logical switches do you have in your environment. That particular API call you are using has a paging function and by default will only return the first 20 objects.

From the NSX 6.2 API Guide

where ?pagesize=XX&startindex=YY specifies the query results to larger pages. The default pagesize is 20 and the default startindex is 0.

0 Kudos
DanyG01
Enthusiast
Enthusiast
Jump to solution

Excellent,  I have 26 logical switches and 6 was missing!

Thank you very much for you help!!!

0 Kudos