Please correct me if I'm wrong...
Right now I have to query anything and everything by the objectId. The issue is that I don't know what that is. I know the name. So, for example, If I know the objectId of an edge device named "myrouter" is "edge-1", then I can do:
https://nsxmgr/api/4.0/edges/edge-1
Awesome! Now I get the entire config. But let's say I don't know the edgeId. Because why would I? I would, however, know its name because that's why I name things. In many other API's all I would have to do is something like this:
https://nsxmgr/api/4.0/edges?name=myrouter
The only way I know of to do this today is to fetch ALL of the edges with the following:
https://nsxmgr/api/4.0/edges
This returns every single edge in the scope! Then I have to do something like (in powershell):
$router_exist = (Select-Xml -Xml $script:edges -XPath "//edgeSummary[name=`"$esr_name`"]").Node
if ($router_exist) {
$router_id = $router_exist.objectId
}
This isn't just for edges...its for every object available. Is it not possible to query based on an attribute?
Thanks,
Daniel