VMware {code} Community
PavanHCL
Contributor
Contributor

How can we get the storage policy details programatically

How can we get the storage policy details programatically??

0 Kudos
3 Replies
japerrin
Contributor
Contributor

Hi Pavan

To do that you can perform a REST API query on "rest/vcenter/storage/policies" on the vCenter server.

 

Regards

Jacques

0 Kudos
PavanHCL
Contributor
Contributor

Thank you Jacques,

I am completly new to this. Could you please share the code snippet or some coding examples, if you have?

Regards

Pavan Kumar K

 

 

0 Kudos
japerrin
Contributor
Contributor

Hi Pavan

Do you want to get all storage policies list (and their property) defined on a vcenter or the storage policy properties defined on a datastore or used by a VM ?

To query storage policies you have to perform a GET REST API on the vcenter on URL : "rest/vcenter/storage/policies"

 

 

Tags (1)
0 Kudos