The recommended configuration through UI will allow you to configure only 2 DNS servers (Primary and Secondary). But if you want to configure more DNS servers then you can use below API.
//To get the Network config
//To edit network configuration
You can verify the same through NSX cli through enable mode:
manager# show startup-config