Skip to content

This project facilitates the integration of Javascript applications with Apache CloudStack through its API

License

Notifications You must be signed in to change notification settings

Autonomiccs/apache-cloudstack-javascript-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apache-cloudstack-javascript-client

This project facilitates the integration of Javascript applications with Apache CloudStack through its API. It is a Javascript framework that enables the execution of requests to Apache CloudStack API. If you want to write only a simple script I recommend you using CloudMonkey, instead of this framework. However, if you have the need to write a Javascript application that has to consume Apache CloudStack API, you are welcome to use this framework.

The latest version can be found at: latest. You can find examples on how to use the framework at examples. There is also a live demo at: live demo. The usage is as simple as that:

        var secretKey = 'secretKey';
	var apiKey = 'apiKey';
	var clientUrl = 'https://cloud.domain.com/client';
	
	var apacheCloudStackClient = autonomiccs.createApacheCloudStackClient(clientUrl, {apiKey: apiKey, secretKey: secretKey});
	
	var apacheCloudStackRequest = autonomiccs.createApacheCloudStackRequest('listClusters');
	apacheCloudStackRequest.addParameter('name', "clusterName");
	
	var result = apacheCloudStackClient.executeRequestGetJson(apacheCloudStackRequest);

The response is a JSON object. Therefore, you can get the result object and start using it right away. There is also another option autonomiccs.executeRequest that returns an XML as a response object.

The framework uses the following libraries:

License

Apache CloudStack Javascript Client

Copyright (C) 2016 Autonomiccs, Inc.

Licensed to the Autonomiccs, Inc. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The Autonomiccs, Inc. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

This project facilitates the integration of Javascript applications with Apache CloudStack through its API

Resources

License

Stars

Watchers

Forks

Packages

No packages published