XenServer can be programatically managed using the XenAPI or XAPI. XAPI is an open source sub-project of the Xen Project. XAPI is an XML-RPC based API, providing programmatic access to the extensive set of XenServer management features. The XenServer API can be called from a remote system as well as local to the XenServer host. Remote calls are generally made securely over HTTPS, using port 443.
There are five SDKs available, one for each of C, C#, Java, PowerShell, and Python. Prior to XenServer 6.1, these SDKs were available under a LGPL/GPL license model, but the current SDKs use a BSD license. All SDKs are backwards compatible to XenServer 4.0, but it is always preferable to use the most recent SDK. To ensure a graceful fallback, client programs are expected to call host.software_version["product_version"] when appropriate.
XenServer API References
XenServer SDK Documentation (HTML Format)
API Guide (PDF Format)
API Class Structure (HTML Format)
SDK Guide (PDF Format)
DDK Guide (PDF Format)
SDK Release Notes (HTML Format)
Powershell SDK Overview (HTML Format)
WMI Interface - A Supported Mechanism to access XenStore data in Windows guests
Download SDK Components
Software Development Kit (C, C#, Java, Python and Powershell bindings)
Driver Development Kit (RPMs required for driver development)
XenServer Plugin Development
The XenServer Transfer VM is used to import and export virtual disk images.
Overview of the main code examples as shipped with the SDK
Information on developing applications providing console access including VNC access.
XenServer SDK Forum (Citrix.com)
How an application can associate VMs with a host (Within a longer article about writing a XenCenter clone)
Several debug techniques for monitoring storage subsystems can be found in the XS 6.1 Storage Performance Guide which maybe of use to those developing products interfacing with the storage sub-system.
Feedback on these pages:
If you have found an error, or think some of the pages in this area need clarifying/augmenting; or you think there are application development tasks we should describe in new how-to-guides; or you have guides you'd like to suggest we include or link to please do comment on our feedback thread: