Oracle DBaaS OEM WebServices
Oracle DBaaS OEM WebServices
Oracle DBaaS OEM WebServices
Calling application
Oracle EM12C
S
Case(s)
2
3
Use Oracle EM12C cloud APIs from a portal for creating a new
database
Example variable
Calling application
Oracle EM12C
S
Case(s)
2
3
Example variable
Calling application
Oracle EM12C
Input required.
2
3
Example variable
Calling application
Oracle EM12C
URI :
/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456
2
3
Request headers :
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=
Content-Type:
application/oracle.com.cloud.common.DbPlatformInstance+json
BODY :
{
"zone": "/em/cloud/dbaas/zone/82CF1C28FA20A183C99D138FF8065F19",
"name": "<Request name>",
"description": "<Request Description>",
"params":
{
"username": "Master Account username for the DB",
"password": "Password for the Master Account on the DB",
"database_sid" : "Database SID" ,
"service_name" : "Name of the additional service to be created"
}
}
Example variable
Calling application
Oracle EM12C
Sample response :
{
2
3
"uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1171" ,
"name" : "Test_create_intance" ,
"resource_state" :
{
"state" : "INITIATED"
} ,
"media_type" :
"application/oracle.com.cloud.common.DbPlatformInstance+json" ,
"canonicalLink" :
"/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/
dbplatforminstance/byrequest/1171" ,
"status" : "SCHEDULED"
}
!! required to request status of creation process in step 3 !!
Example variable
Calling application
Oracle EM12C
curl example :
2
3
Example variable
Calling application
Oracle EM12C
curl example :
2
3
Username:password
Username & password of the self service user (inside OEM) who is
requesting the new database to be created.
Needs to be provided from a free text fields in the custom request
form within the calling application
Example variable
Calling application
Oracle EM12C
curl example :
2
3
Zone ID
Needs to be provided as the value of a dropdown menu in the custom
request form within the calling application where the visible text is a
meaningful text to humans. (when only one zone is available this could be a static hidden
value in the form)
Example variable
Calling application
Oracle EM12C
curl example :
2
3
Name
Name of the request. (possible naming convention 20 chars long & no spaces)
Needs to be provided from a free text field in the custom request form
within the calling application.
10
Calling application
Oracle EM12C
curl example :
2
3
Description
Description of the request. (possible naming convention 50 chars long & no special chars)
Needs to be provided from a free text field in the custom request form
within the calling application.
11
Calling application
Oracle EM12C
curl example :
2
3
Username (DB)
Master account username for the database. (possible naming convention 10 chars
long & no special chars)
Needs to be provided from a free text field in the custom request form
within the calling application.
12
Calling application
Oracle EM12C
curl example :
2
3
Password (DB)
Master account password for the database. (possible naming convention min 8
chars long, should include at least one capital letter and a number)
13
Calling application
Oracle EM12C
curl example :
2
3
Service name
Service name for the database. (possible naming convention min 10 chars long, should
all be capital letters, no special chars)
14
Calling application
Oracle EM12C
curl example :
2
3
FQDN
FQDN of the EM12C server
Example variable
15
Calling application
Oracle EM12C
curl example :
2
3
Template ID
Needs to be provided as the value of a dropdown menu in the custom
request form within the calling application where the visible text is a
meaningful text to humans. (when only one template is available this could be a static
hidden value in the form)
Example variable
16
Calling application
Oracle EM12C
2
3
Example variable
17
Calling application
Oracle EM12C
2
3
Example variable
18
Calling application
Oracle EM12C
URI :
/em/cloud/dbaas/dbplatforminstance/byrequest/1171
Request headers :
Authorization: basic ZGVtb3VzZXI6ZGVtb3VzZXI=
BODY :
2
3
Example variable
19
Calling application
Oracle EM12C
curl example :
curl -k -u username:password
https://example.company.com.nl:7799/em/cloud/dbaas/dbplatforminstance/b
yrequest/1171
2
3
Username:password
Username & password of the self service user (inside OEM) who is
requesting the new database to be created.
Is already provided as part of input for step 1 Needs to be provided
from a free text fields in the custom request form within the calling
application
Example variable
20
Calling application
Oracle EM12C
curl example :
curl -k -u username:password
https://example.company.com.nl:7799/em/cloud/dbaas/dbplatforminstance/b
yrequest/1171
2
3
FQDN
FQDN of the EM12C server
Example variable
21
Calling application
Oracle EM12C
Sample response :
{
2
3
"uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1171" ,
"name" : "REQUEST_TESTDB_CREATE_31_41" ,
"description" : "Create Database for \"REQUEST_TESTDB\"." ,
"resource_state" :
{
"state" : "CREATING"
} ,
"context_id" : "1171" ,
"media_type" :
"application/oracle.com.cloud.common.DbPlatformInstance+json" ,
"canonicalLink" :
"/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/
dbplatforminstance/byrequest/1171" ,
"status" : "IN_PROGRESS" ,
"created" : "2014-11-24 18:31:43.0"
}
!! Indicating creation is not ready, return to step 2 !!
Example variable
22
Calling application
Oracle EM12C
Sample response :
{
2
3
"uri" : "/em/cloud/dbaas/dbplatforminstance/byrequest/1171" ,
"name" : "DBNAME.example.company.com" ,
"resource_state" :
{
"state" : "READY"
} ,
"context_id" : "1171" ,
"media_type" :
"application/oracle.com.cloud.common.DbPlatformInstance+json" ,
"canonicalLink" :
"/em/websvcs/restful/extws/cloudservices/service/v0/ssa/em/cloud/dbaas/
dbplatforminstance/byrequest/1171" ,
"status" : "RUNNING" ,
"created" : "2014-11-24 18:40:41.0" ,
"based_on" :
"/em/cloud/dbaas/dbplatformtemplate/CC3BBB665A6BC6FFE040F00AEF252456" ,
"connect_string" :
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=somehost.examp
le.company.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=TESTNAME.exampl
<SNIP>
Example variable
23
Calling application
Oracle EM12C
Additional information.
2
3
Example variable
24
Calling application
Oracle EM12C
Additional information.
2
3
"measurable_attributes" :
[
{"name:"up_time,"value:"0,"units:"Hours} ,
{"name:"total_sga,"value:"4077.703,"units:"MB} ,
{"name:"available_space,"value:"1056.813,"units:"MB} ,
{"name:"cpu_utilization,"value:"0.071,"units:"%} ,
{"name:"total_memory,"value:"4253.839,"units:"MB} ,
{"name:"db_time,"value:".117,"units:"CentiSeconds Per Second},
{"name":"cpu_count","value":"2","units":"Cores}
]
Example variable
25
Calling application
Oracle EM12C
Next step.
2
3
Example variable
26
More information
28
About Capgemini
With almost 140,000 people in over 40 countries, Capgemini is
one of the world's foremost providers of consulting, technology
and outsourcing services. The Group reported 2013 global
revenues of EUR 10.1 billion.
Together with its clients, Capgemini creates and delivers
business and technology solutions that fit their needs and drive
the results they want. A deeply multicultural organization,
Capgemini has developed its own way of working, the
Collaborative Business Experience, and draws on
Rightshore, its worldwide delivery model.
Learn more about us at www.capgemini.com.
www.capgemini.com
The information contained in this presentation is proprietary.
2014 Capgemini. All rights reserved.
Rightshore is a trademark belonging to Capgemini.