This API has a deprecated equivalent from v7.0U1.
List Policies
DescriptionReturns information about at most 1024 visible (subject to permission checks) storage solicies availabe in vCenter. These storage policies can be used for provisioning virtual machines or disks.
Request
URLURL
https://{api_host}/api/vcenter/storage/policies
Query Parameters
Query Parameters
filter
Optional
Specification of matching storage policies for which information should be returned.
If unset, the behavior is equivalent to a Policies.FilterSpec with all fields unset which means all storage policies match the filter
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Response
Response
Response BodyResponse Body
200 OK returns
array
of
StoragePoliciesSummary of type application/json
Commonly used Information about the storage policies.
{
"description": "string",
"name": "string",
"policy": "string"
}
string
description
Required
Description of the storage policy.
string
name
Required
Name of the storage policy.
string
policy
Required
Identifier of the storage policy. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.vcenter.StoragePolicy. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.vcenter.StoragePolicy.
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/api/vcenter/storage/policies
Errors
400
com.vmware.vapi.std.errors.invalid_argument : if the Policies.FilterSpec contains a value that is not supported by the server.
403
com.vmware.vapi.std.errors.unauthorized : if the user doesn't have the required privileges.
500
com.vmware.vapi.std.errors.unable_to_allocate_resource : if more than 1024 storage policies exist.
503
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
Availability
Added in 7.0U2