2.0
Table Of Contents
- VMware vFabric Data Director API Programming Guide
Managing a Database 5
This section provides examples of how to perform management tasks on your database using the REST API.
These tasks include provisioning, deleting, reconfiguring, and cataloging a database.
Provisioning a Database
In this example, we assume that you have created a DB group, and that the DB Group ID is 26.
The example also assumes that you have created a base DB template with an ID of 1, and assigned it to a
resource bundle for DB Group 26. It also assumes that you have enabled the template in the Organization that
DB Group 26 belongs to.
The resource template and backup template used in this example are available by default, so you do not have
to create them.
Note that a parameterGroupSetting is required when creating a database.
Here is an example of the REST API request to create a database with these assumptions.
POST https://example.aurora.com\
/datadirector/api/databases
Content-type : application/json
Authorization : Basic YWRtaW5AYXVyb3JhLnZtd2FyZS5jb206Y2xvdWRibXM=
Accept : application/json
{
"administratorConfig": {
"ownerName": "Aurora",
"ownerPassword": "Aurora"
},
"backupSetting": {
"backupTemplateId": 15
},
"baseDbTemplateId": 1,
"dbName": "Aurora_provision",
"dbgroupId": 26,
"description": "RestApiExample: provision database",
"ipWhitelistConfig": {
"enabled": true,
"ipWhitelistDbIpRange": {
"instance": [
{
"beginAddress": "10.37.1.1",
"description": "ip range",
VMware, Inc.
25