REST API - get

vcenter datastore: get

Retrieves information about the datastore indicated by datastore.

Request:

HTTP request

GET https://{server}/rest/vcenter/datastore/{datastore}

Path Parameters

Name Type Description
Required
datastore string Identifier of the datastore for which information should be retrieved.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "accessible"true,
        "multiple_host_access"true,
        "name""string",
        "type""VMFS",
        "free_space"1,
        "thin_provisioning_supported"true
    }
}

Response Type:

Name Type Description
bold = required
value info Information about the datastore associated with datastore.
value.name string Name of the datastore.

value.type string Type (VMFS, NFS, NFS41, CIFS, VSAN, VFFS, VVOL, PMEM) of the datastore.

Defines the supported types of vCenter datastores. Value is one of:
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).
PMEM: Persistent Memory File System (ESX Server only). Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

value.accessible boolean Whether or not this datastore is accessible.

value.free_space long Available space of this datastore, in bytes.

The server periodically updates this value.

Optional. This field will be unset if the available space of this datastore is not known.

value.multiple_host_access boolean Whether or not ore than one host in the datacenter has been configured with access to the datastore.

value.thin_provisioning_supported boolean Whether or not the datastore supports thin provisioning on a per file basis. When thin provisioning is used, backing storage is lazily allocated.

Errors:

HTTP Status Code Type Description
404 not_found if the datastore indicated by datastore does not exist.
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.