VMware Cloud Community
BryanAshby
Contributor
Contributor

vCenter REST API: Get Datastores and Networks available to Host

I'm using the REST API to retrieve datastores and networks. The problem is, there does not appear to be a way to filter these by host and therefore, I retrieve invalid options.

How can I filter datastores and networks that are available/accessible to a given host?

Tags (2)
0 Kudos
1 Reply
brandonsharp
Contributor
Contributor

We're having a similar issue. There seems to be no host or cluster filter available on either datastore or network.

We circumvented this issue by having someone go through and organize these resources into folders that match the cluster name they're assigned to, which at least allows us to query the way we need to (keeping in mind that you have to query to get the folder ID, and then pass that into the folder filter for datastore/network call). But it would be nice to eliminate that bit of manual work in keeping things up to date, and have the ability to do this query directly in the REST API.

0 Kudos