REST API - list

vcenter storage policies: list

Returns 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. This operation was added in vSphere API 6.7.

Request:

HTTP request

GET https://{server}/rest/vcenter/storage/policies

?filter.policies.1=obj-103
&filter.policies.2=obj-103

Request Query Parameters:

Name Type Description
bold = required
filter filter_spec Optional. Specification of matching storage policies for which information should be returned.
filter.policies string[] Identifiers of storage policies that can match the filter. This attribute was added in vSphere API 6.7.

Optional. If unset or empty, storage policies with any identifiers match the filter.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: com.vmware.vcenter.StoragePolicy. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: com.vmware.vcenter.StoragePolicy.

Response:

HTTP Status Code: 200

Representation:

{
    "value"[
        {
            "name""string",
            "description""string",
            "policy""obj-103"
        },
        {
            "name""string",
            "description""string",
            "policy""obj-103"
        }
    ]
}

Response Type:

Name Type Description
bold = required
value summary[] Commonly used Information about the storage policies.
value[].policy string Identifier of the storage policy. This attribute was added in vSphere API 6.7.

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.

value[].name string Name of the storage policy. This attribute was added in vSphere API 6.7.

value[].description string Description of the storage policy. This attribute was added in vSphere API 6.7.

Errors:

HTTP Status Code Type Description
400 invalid_argument if the vcenter.storage.policies.filter_spec contains a value that is not supported by the server.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.
500 unable_to_allocate_resource if more than 1024 storage policies exist.