Approval functions
Use the following procedure for approval functions to list the pending approvals and to approve objects.
The base URL for the API is:
https://<managerHostName>/bda/rest/api
Pending approval
Use the following procedure to list pending approve objects.
Note
MySQL is not supported through REST API.
Syntax
/1.0/pending_approval
Method
GET
Required Parameter
type
—Use the type of object. It can be Hosts, Oracle, MSSQL, DB2, or Sybase.
Optional Parameter
subtype
—Use the subtype of object. It can be instances, databases, homes, pluggable_databases, alwayson_groups, repservers, repserver_homes, dataservers, or dataserver_homes.
Example API response
The following is an example response of Type Hosts:
{
"status": "success",
"status_code": 200,
"data": {
“hosts”: [
{
"status": null,
"cluster_binaries": "ORACLE",
"cluster_version": "11.2.0.4",
"unapproved_cluster": "bcfccbba96ae5a9a",
"fixed_ip": "172.19.0.243",
"node_id": "7e5f3a26b19dbf63",
"node_class": null,
"chassis": null,
"slot": null,
"UnapprovedNode": null,
"cluster": null,
"cluster_name": "Restart",
"cpu_speed": "2147",
"cpu_name": "PowerPC_POWER7 2147 MHz",
"hostname": "ax71-rs-549.bmc.com",
"cpu_count": "1",
"eth": "en2,172.19.0.243,255.255.252.0,en3,172.19.32.74,255.255.252.0,en4,unknown,unknown,en5,unknown,unknown,sit0,unknown,unknown,lo0,127.0.0.1,255.0.0.0",
"memory": "8589934592",
"osarch": "powerpc",
"osversion": "AIX 7.1"
}
]
}
}
The following is an example response of Type Sybase:
{
"status": "success",
"status_code": 200,
"data": {
"repservers": [
{
"parent": "/e6697dc2a7642755",
"app_type": "sybase_repserver",
"app": "rs1",
"parent_display_path": "/rh7-si-468.bmc.com",
"node_id": "e6697dc2a7642755",
"app_identifier": "rs1",
"version": "15.7.1",
"domain": "/",
"id": "c211f7a6b2e95726",
"hostname": "rh7-si-468.bmc.com",
"parent_display_name": "rh7-si-468.bmc.com",
"fixed_ip": "172.19.22.93"
}
],
"repserver_homes": [],
"dataservers": [
{
"app_identifier": "test_ds2",
"version": "16.0",
"app_type": "sybase_dataserver",
"parent_display_name": "rh7-si-468.bmc.com",
"parent": "/e6697dc2a7642755",
"fixed_ip": "172.19.22.93",
"app": "test_ds2",
"id": "09470f6b0b0eeb8c",
"node_id": "e6697dc2a7642755",
"parent_display_path": "/rh7-si-468.bmc.com",
"domain": "/",
"hostname": "rh7-si-468.bmc.com"
},
],
"dataserver_homes": [
{
"id": "98bbf1025043186e",
"app": "opt_sap_ASEHome",
"fixed_ip": "172.19.22.93",
"hostname": "rh7-si-468.bmc.com",
"domain": "/",
"parent_display_path": "/rh7-si-468.bmc.com",
"node_id": "e6697dc2a7642755",
"app_identifier": "opt_sap_ASEHome",
"parent_display_name": "rh7-si-468.bmc.com",
"parent": "/e6697dc2a7642755",
"app_type": "sybase_dataserver_home",
"version": "16.0"
}
]
}
}
Example API command
The following is an example command of Type Hosts:
curl -k -H "x-auth-token: 02f6ebfd36ce9a93d4468e32e8a9d80d" https://my.bda.manager.com/bda/rest/api/1.0/pending_approval?type=hosts
The following is an example command of Type Sybase:
curl -k -H "x-auth-token: 02f6ebfd36ce9a93d4468e32e8a9d80d" https://my.bda.manager.com/bda/rest/api/1.0/pending_approval?type=sybase
Approval
Use the following procedure to approve objects.
Syntax
/1.0/approve
Method
GET
Required Parameters
name
—Use the name of the object that you want to approve. You can find this value in response of the pending approval API.id
—ID of the object that you want to approve. You can find this value after calling the pending ppproval API.type
—Use the type of the object. It can be Hosts, Oracle, MSSQL, DB2, or Sybase.subtype
—Use the subtype of the object. It can be instance, database, home, pluggable_database, repserver, repserver_home, dataserver, or dataserver_home.
Example API response
{
"status": "success",
"status_code": 200,
"data": {
"test_ds2": "Sybase Dataserver Approved"
}
}
Example API command
curl -k -H "x-auth-token: ad7aaa89fbf0ef648ddd1607007e819f" –data "name=test_ds2&id=09470f6b0b0eeb8c&type=sybase&subtype=dataserver" https://my.bda.manager.com/bda/rest/api/1.0/approve
Comments
Log in or register to comment.