The vSAN Management SDK for Java provides WSDL files, sample code, and API reference for developing custom Java clients against the vSAN Management API. The vSAN Management SDK for Java depends on the vSphere Web Services SDK of similar level. You use the vSphere Web Services SDK for logging in to vCenter Server and for retrieving vCenter Server managed objects.

API Reference

The vSAN API reference documentation is included in the /docs directory. To view the API Reference, open index.html with a Web browser.

WSDL Files and vSAN Java Bindings

The vSAN Management SDK for Java includes the vsan.wsdl and vsanService.wsdl files in the bindings/wsdl directory. You can use the WSDL definitions to build Java bindings for accessing the vSAN Management API. You can build Java bindings using the build.py script.

Note: You must have Python 2.7.13 or later to run the build.py script.

Running the Sample Applications

The vSAN Management SDK for Java includes sample applications, build and run scripts, and dependent libraries. They are located under the samplecode directory in the SDK.

You can use the sample code to get vSAN managed objects on vCenter Server or ESXi hosts.

Before running the sample applications, make sure that you have the vSphere Web Services SDK on your development environment, with the following directory structure:

VMware-vSphere-SDK-<version number>-build
	SDK
		vsphere-ws
Then copy the vsan-sdk-java directory at the same level as the vsphere-vs directory in the vSphere Web Services SDK:
VMware-vSphere-SDK-<version number>-build
	SDK
		vsphere-ws
		vsan-sdk-java

Build the sample applications by running the build.py command.

Run the sample applications using the run.sh script on Linux, or the run.bat script on Windows:

./run.sh com.vmware.vsan.samples.<sample_name>
	--url https://<vCenter Server or host address>/sdk
	--username <username>
	--password <password>

To get information about the parameter usage, use -h or --help.