Skip to content

HOWTO: Writing API Clients

Marcio Silva edited this page Feb 20, 2017 · 1 revision

Write Client code against the tool's API

This toolkit provides API for client programming in 3 different languages using XML-RPC to be used to direct benchmarks and algorithms against the API for maximum flexibility.

Additionally, these bindings also provide accessor methods for retrieving data from the mongodb database which the tool uses to store monitoring data.

Typically, upon starting up the tool, an "API Service" (xmlrpc server) is started on port 7070.

In order to use it, you would choose a language:

  1. Python: from import api_service_client import *
  2. Java: import api.*;
  3. Ruby: require 'api_service_client'
  4. C++: #include "apl_service_client.hpp";

API Client Examples in each language:

  1. Python: clients/provision_vm.py, clients/provision_application.py
  2. Java: clients/ProvisionVM.java, clients/ProvisionAPP.java
  3. Ruby: clients/provision_vm.rb, clients/provision_application.rb
  4. C++: clients/provision_vm.cpp, clients/provision_application.cpp, clients/list_regions.cpp

These examples are fairily self-explanatory. If you help or would like bindings written in a new language, don't hesitate to contact us and we'll try to accomodate you.

Clone this wiki locally