List Datastore
Returns information about at most 2500 visible (subject to permission checks) datastores in vCenter matching the Datastore.FilterSpec.
Request
URLURL
Query Parameters
Query Parameters
Datacenters that must contain the datastore for the datastore to match the filter. If unset or empty, datastores in any datacenter match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.
Identifiers of datastores that can match the filter. If unset or empty, datastores with any identifier match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datastore. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datastore.
Folders that must contain the datastore for the datastore to match the filter. If unset or empty, datastores in any folder match the filter. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.
Names that datastores must have to match the filter (see Datastore.Info.name). If unset or empty, datastores with any name match the filter.
Types that datastores must have to match the filter (see Datastore.Summary.type). If unset or empty, datastores with any type match the filter.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
array
of
DatastoreSummary
of type application/json
Commonly used information about the datastores matching the Datastore.FilterSpec.
[
{
"capacity": 0,
"datastore": "string",
"free_space": 0,
"name": "string",
"type": "VMFS"
}
]
Identifier of the datastore. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datastore. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datastore.
Name of the datastore.
The Datastore.Type enumerated type defines the supported types of vCenter datastores.
VMFS : VMware File System (ESX Server only).
NFS : Network file system v3 (linux & esx servers only).
NFS41 : Network file system v4.1 (linux & esx servers only).
CIFS : Common Internet File System.
VSAN : Virtual SAN (ESX Server only).
VFFS : Flash Read Cache (ESX Server only).
VVOL : vSphere Virtual Volume (ESX Server only).
Possible values are: VMFS , NFS , NFS41 , CIFS , VSAN , more...
Capacity of this datastore, in bytes. The server periodically updates this value.
This field will be unset if the capacity of this datastore is not known.
Available space of this datastore, in bytes. The server periodically updates this value.
This field will be unset if the available space of this datastore is not known.
Errors
com.vmware.vapi.std.errors.invalid_argument : if the Datastore.FilterSpec.types field contains a value that is not supported by the server. if the Datastore.FilterSpec.types field contains a value that is not supported by the server.
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.unable_to_allocate_resource : if more than 2500 datastores match the Datastore.FilterSpec.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: get
x-vmw-doc-deprecated-path: /rest/vcenter/datastore
x-vmw-doc-operation: list