Datastore Access (/folder)

An HTTP request for datastore access uses the following syntax:
http-method http[s]://server/folder[[/path]?dcPath=path[&dsName=name]]
http-method
One of the methods
GET
,
HEAD
,
PUT
, or
DELETE
.
http:// or https://
Access protocol (standard access or secure access).
server
ESXi or vCenter Server target system. The server value can be an IP address or a DNS name.
/
folder
Specifies datastore access on an ESXi or vCenter Server system. The datastore URL can include the following optional elements:
  • path
    – Path to a file or directory in the datastore, relative to the root of the datastore.
  • dcPath
    – Inventory path to a datacenter. Specify the datacenter path as a name-value pair in the request. For a datacenter named
    Datacenter
    located in the root folder, the
    dcPath
    value is
    MyDatacenter
    . For a datacenter named
    YourDatacenter
    located in the folder
    NorthAmerica
    which is located in the root folder, the
    cdPath
    value is
    NorthAmerica/YourDatacenter
    .
  • dsName
    – Datastore associated with the datacenter. Specify the datastore name as a name-value pair in the request.
The following examples illustrate the syntax. If the target server is an ESXi system,
dcPath=DCPATH&
is optional and defaults to
dcPath=ha-datacenter
.
Example
Description
/folder
Directory listing of known datacenters on this server.
/folder?dcPath=
path
Directory listing of all datastores available at the specified datacenter.
/folder?dcPath=
path
&dsName=
name
Top-level directory listing of the datastore.
/folder/
path
?dcPath=
path
&dsName=
name
Directory listing of all files in a datastore directory.
/folder/
path
/disk-flat.vmdk?dcPath=
path
&dsName=
name
Access individual files.