While we spend a lot of time developing GUI for our private cloud features – like the self service portal, setup screens, etc, a large percentage of our customers use these features via our APIs, both EMCLI and REST based.
Q: So why would anyone not use the out of the box cloud (self service) portal and use the APIs instead?
A: Well, there are many reasons:
- You already have a custom cloud portal that you use to deploy non-Oracle products and now you would like Oracle products to be part of it
- You want cloud related actions to be part of a larger orchestration flow. For example, prior to provisioning, you want to integrate an approval workflow, and then post-provision update your asset management system with the service details.
- You want to integrate the cloud actions with our IT service desk or ticketing systems
- Integrate actions like cloning of databases (Snap Clone), or provisioning of middleware and applications with your continuous integration or devops process.
I am sure there are more reasons, but this list should do for now.
Q: What kind of APIs does EM12c expose?
A: Typically, we identify two key roles in the Private Cloud space:
- Service Providers – This role represents the various administrators like DBAs, sysadmins, storage admins, etc that help setup and manage the private cloud infrastructure. EM12c provides EMCLI verbs and RESTful APIs for all actions that can be performed by this role.
- Service Consumers – This role represents the users who request and consume cloud based services like databases, VMs, middleware servers, etc. This role can access the cloud services from either the out-of-the-box cloud portal, or using RESTful APIs.
This blog post is focused on the the RESTful APIs provided for Service Consumers. The best way to understand and learn about these APIs is to see them in action. In the video below, i explain the various concepts (note i assume that you are already familiar with EM12c DBaaS concepts, if not check the references section), demo the cloud portal, and then perform the same actions using RESTful APIs. The demo is approx. 23 minutes long, so grab a drink before you get started.
The Python script used to demo the APIs can be found here. Note: i am posting this script as sample implementation, so there is no formal support available for it. Also, the demo was recorded on the latest version of EM – EM12c R4 Plugin Update 1.
Finally, I am often asked about customer examples. Till date, i have seen customers use our REST APIs from Chef recipes, shell scripts using the curl command, from 3rd party tools like Service Now and VMware vCAC, custom Java based applications, etc. Unfortunately, i am not an expert on any of these 3rd party tools, so i probably cannot tell you how the integration was done, but i would be more than happy to help you with the EM REST APIs.
Hopefully this was a good introduction to our EM12c Database as a Service (Private Database Cloud) REST APIs. I encourage you to play with the APIs and post code examples for the benefit of other users.
References:
Screenwatch: Oracle Enterprise Manager 12c: Build Service Catalog with DBaaS
Documentation: Cloud Administration Guide, REST API Chapter
Jagjeet Singh said:
Nice Post, that’s what I was looking for one of my customer.
Thanks!
LikeLike
adeeshfulay said:
Thanks! Glad you like it.
LikeLike
Gunes Erol said:
Nice Post
LikeLike
Pingback: Here Comes Summer | Oracle Business Intelligence
Ilja Livenson said:
Hello,
many thanks for the blog entry, we are working on integration of EM with a python application through a REST API (code/lib will be based on your examples and released as open-source).
A couple of questions came up that I’ve failed to find answers to, perhaps you could hint?
– How is it possible to get monitoring information for the provisioned DB instances?
– Is it possible to somehow extract chargeback information through REST interface?
thanks in advance!
LikeLike
adeeshfulay said:
Ilja, glad you found the examples useful. Here are some quick answers. BTW, i am no more with Oracle so the details i provide might be a little stale.
– Currently, there is no formal REST API to get monitoring information for provisioned DB instances today. The response for GET on DB instance provides some details, but no enough. Your best option is to query the published repository views. I believe these are in the EM Extensibility guide.
– While this was being discussed, there is no formal REST API for retrieving chargeback data. Your best option here is to use the emcli verb to get metering data, or again query the published repository views.
LikeLike
Pingback: Here Comes Summer – OBIEE News