VMware NSX API using page size 0 returns unexpected results
search cancel

VMware NSX API using page size 0 returns unexpected results


Article ID: 322667


Updated On:


VMware NSX Networking


  • You have groups setup with members as virtual machines.
  • When you click on View Members of the group it shows the virtual machine and IP address.
  • When you want to query what groups a particular IP address is a member of, you use the following API:
  • This API returns the following results:
    "results": [
            "target_id": "/infra/domains/default/groups/test-vm",
            "target_display_name": "test-vm",
            "target_type": "DOMAIN_GROUP",
            "is_valid": true,
            "path": "/infra/domains/default/groups/test-vm"
    "result_count": 1,
    "sort_by": "target_display_name",
    "sort_ascending": true
  • When using the the page_size 0, you expect to only see the result_count and no results.


VMware NSX-T Data Center
VMware NSX-T Data Center 2.x
VMware NSX-T Data Center 3.x
VMware NSX-T Data Center 4.x


When the page_size is set to zero, the API by default was set to display a page size of 5000 and 1000 if no page_size was set, which resulted in displaying the membership results.


This is a known issue impacting VMware NSX.

If you wish to only see the result count and not all the membership results, you can set the page_size to 1, this implies you will have 1 membership result, but you can see the result_count.