Cloud API
Introduction
The DAAS solution boasts a comprehensive cloud application programming interface or API. It allows you to create and manage cloud resources, including compute, storage, and networking components.
This allows you to easily integrate the DAAS solution with your own applications or to script common tasks.
The API can be accessed using either XML-RPC or REST which are both widely supported remote execution protocols.
How does it work ?
For the full Cloud API documentation, please contact us.
In this section, we will illustrate how easy it is to connect to the API and perform some functionality on it.
REST API
REST Connection
Representational state transfer or REST allows you to invoke remote procedure calls by using a correctly formatted http request. You can read more about REST below.
The URL is formatted as follows :
| REST URL http://<username>:<password>@<your DAAS cloud url>:<port number>/appserver/rest/cloud_api_<category>/<action>?<param1>=<value1>&<param2>=<value2> |
Some explanations :
- This is the Cloud API category you wish to invoke a method on
- This is the method you wish to invoke
- Optional: These are the parameters required for this method
REST Example
The quickest way to test the REST interface is by using the Linux "wget" command
In linux execute the following :
XML-RPC API
How to connect over XML-RPC will depend on the programming or scripting language and the XML-RPC library your are using. In our example we use Python and the built-in 'xmlrpclib'
XML-RPC Connection
Step 1 : Install and import a XML RPC library :
Step 2 : Set up a connection object :
XML-RPC Example
Now that we have access to the remote object we execute the function as follows :
This will start the machine with the given machineguid
Technology Partners
REST
Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems.
REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of "representations" of "resources". A resource can be essentially any coherent and meaningful concept that may be addressed. A representation of a resource is typically a document that captures the current or intended state of a resource.
Connecting to your DAAS cloud and invoking a method is as easy as creating a correctly formatted url and sending the request.
XMl-RPC
XML-RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a transport mechanism.
| Connecting to the XML-RPC interface depends on the programming language of choice. The generic principle is to create a 'XML-RPC object' that will be used to invoke the Cloud API methods. The example provided is using Python and the "xmlrpclib"-library. |
Pylabs
The Cloud API is based on the 'PyLabs' application server. A 'PyLabs' extension that allows you to easily create new client-server applications without losing time on setting up the architecture allowing you to focus on rapid application development.

PyLabs is a powerful scripting language, tailored to the needs of system administrators, independent of any specific operating system.
PyLabs is a cross-platform scripting language and works exactly the same on Windows, Linux or Solaris. PyLabs also comprises the Q-Package framework, a comprehensive cross-platform application packaging and distribution framework. Visit qpackages.org and pylabs.org for more information.
