Archive

What are the IBM SmartCloud Enterprise APIs?

Share this post:

Usually we access IBM SmartCloud Enterprise platform through the portal (ibm.com/cloud/enterprise) to order servers, storage, IP addresses, and to take other actions such as create an image out of an instance. This is easy to use and very user-friendly, however if you want to integrate your own solution with IBM SmartCloud Enterprise or automate processes, you can use the API provided by the IBM SmartCloud Enterprise platform.

The IBM SmartCloud Enterprise platform provides APIs, which can help you to integrate the platform with external systems. These systems can be, among others, service management request system, consumption monitoring systems.

Three types of APIs are available to manage the IBM SmartCloud Enterprise platform:

  • RESTFul API
  • Java API
  • Command-line API

The Java API is a wrapper around the RESTFul API, meaning that the Java API provides beans and classes from which you call methods; each method will call the RESTFul API. The command-line API calls a Java API method, which triggers RESTFul API requests.

RESTFul API

By definition RESTFul APIs are based on HTTP requests and methods. For example, a GET method will retrieve information from the platform, a POST method will create resource on the platform. The IBM SmartCloud Enterprise RESTFul APIs are implemented in an application server that is located on the IBM SmartCloud Enterprise platform and thus a base URL address is provided to specify that server. This base URL is: https://www.ibm.com/computecloud/enterprise/api/rest/20100331.

As an example, the following URL will list all instances you owned on the IBM SmartCloud Enterprise platform:

https://www.ibm.com/computecloud/enterprise/api/rest/20100331/instances

The RESTFul API can return either an XML or JSON object.

The documentation is available from the support page of the IBM SmartCloud Enterprise portal:

Java API

The Java API provides beans and classes. A special class, DeveloperCloud, provides a getClient() method, which returns an object that implements the DeveloperCloudClient interface. This object must be, at least, initialized with your credentials. After you have this object, you can call any methods of the interface such as createIntances(), deleteInstances(), addKey(). For example, the describeInstances() method will return a List of Instance object.

To use these APIs, download the IBM SmartCloud Enterprise Java API library from the IBM SmartCloud Enterprise portal. From the same location, you can also download the Javadoc:

Command-line API

The command-line API (CLI) consists of a number of batch files that provide the same functionality as the other APIs. Batch files are provided for Windows and Linux platforms. They also run on the Mac operating system.

After installation, you will be able to use command lines such as ic-create-instance.cmd or .sh depending on your platform.

You can download them from the support tab of IBM SmartCloud Enterprise portal:

Extras

After logging in to the IBM SmartCloud Enterprise platform, you may also download extra command lines and a Java library from the following address:

https://www.ibm.com/cloud/enterprise/ram/assetDetail/generalDetails.faces?guid={4F0A71BF-74B7-C9A4-AD24-430331F9AC99}

This library provides a number of new command lines, such as handy-ic-wait-instances, which waits for a list of instances to reach a given status, or handy-ic-create-instances, which creates a number of instances in one command line.

You can also reuse the provided Java library in your own Java code.

For more information about the IBM SmartCloud Enterprise and other IBM cloud solutions, visit http://www.ibm.com/cloud-computing.

More stories

Why we added new map tools to Netcool

I had the opportunity to visit a number of telecommunications clients using IBM Netcool over the last year. We frequently discussed the benefits of have a geographically mapped view of topology. Not just because it was nice “eye candy” in the Network Operations Center (NOC), but because it gives an important geographically-based view of network […]

Continue reading

How to streamline continuous delivery through better auditing

IT managers, does this sound familiar? Just when everything is running smoothly, you encounter the release management process in place for upgrading business applications in the production environment. You get an error notification in one of the workflows running the release management process. It can be especially frustrating when the error is coming from the […]

Continue reading

Want to see the latest from WebSphere Liberty? Join our webcast

We just released the latest release of WebSphere Liberty, 16.0.0.4. It includes many new enhancements to its security, database management and overall performance. Interested in what’s new? Join our webcast on January 11, 2017. Why? Read on. I used to take time to reflect on the year behind me as the calendar year closed out, […]

Continue reading