URL Syntax for HTTP Access
The URL specification in an HTTP request to a vSphere server includes one of the following keywords, which determines the type of access.
Datastore Access (/folder)
An HTTP request for datastore access uses the following syntax:
http-method http[s]://server/folder[[/path]?dcPath=path[&dsName=name]]
One of the methods GET, HEAD, PUT, or DELETE.
http:// or https://
/folder
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 ESX/ESXi system, dcPath=DCPATH& is optional and defaults to dcPath=ha-datacenter.
/folder?dcPath=path&dsName=name
/folder/path?dcPath=path&dsName=name
/folder/path/disk-flat.vmdk?dcPath=path&dsName=name
Host File Access (/host)
An HTTP request for access to ESX/ESXi configuration files uses the following syntax:
GET http[s]://my_system/host
http-method http[s]://my_system/host/file
One of GET, HEAD, or PUT, depending on the type of configuration file (see HTTP Host Access (/host URL)).
http:// or https://
/host/file
HTTP Host Access (/host URL) shows ESX host configuration files and the corresponding HTTP/HTTPS methods for access. The set of files might change from version to version.
Update Package Access (/tmp)
An HTTP request for update package access uses the following syntax:
PUT http[s]://esx-server/tmp/file-path
http:// or https://
/tmp/file-path
Privilege Requirements for HTTP Access
HTTP access to a vSphere file is access to a datastore object that is associated with the folder structure in the vSphere inventory. HTTP access requires the same privileges needed to obtain these files using any other mechanism, such as the vSphere Client. Privileges Required for HTTP Access Datastore Objects shows the required privileges.