This API cookbook recipe demonstrates how to provision an Oracle VDB using the Delphix Engine API.

In order to provision an Oracle VDB using the API, you need to provide a set of parameters of type OracleProvisionParameters (having already authenticated as per API Cookbook: Authentication).

There are a number of parameters you will need to know:

  • Group reference - See the list operation in "/api#group" on your Delphix Engine
  • VDB name -  The name you want the new VDB to be called
  • Mount path - Where to mount datasets on the target host.
  • DB/unique names - The Oracle DB and unique names, often the same as the VDB name
  • Instance name/number - The Oracle instance name and number to use (dictated by your environment, but often VDB name and 1)
  • Repository reference - See the list operation on "/api#repository" on your Delphix Engine
  • TimeFlow point - See API Cookbook: List Snapshots for more information on finding a TimeFlow point, as well as the reference at "/api#TimeflowPoint Parameters

You will need to use the structure of the OracleProvisionParameters object to fill it out, see "/api/#OracleProvisionParameters" for details on which fields are mandatory/optional.


Here is a minimal example using curl to communicate with the API, provisioning a VDB called "EGVDB" (authentication omitted)

curl -X POST -k --data @- http://delphix1.company.com/resources/json/delphix/database/provision \
	-b cookies.txt -H "Content-Type: application/json" <<EOF
{ 
	"container": {
		"group": "GROUP-2",
		"name": "EGVDB", 
		"type": "OracleDatabaseContainer"
	},
	"source": {
		"type": "OracleVirtualSource",
		"mountBase": "/mnt/provision", 
        "allowAutoVDBRestartOnHostReboot": true
    },	
	"sourceConfig": {
		"type": "OracleSIConfig",
		"databaseName": "EGVDB", 
		"uniqueName": "EGVDB", 
		"repository": "ORACLE_INSTALL-3",
		"instance": {
			"type": "OracleInstance",
			"instanceName": "EGVDB",
			"instanceNumber": 1
		}
	},
	"timeflowPointParameters": {
		"type": "TimeflowPointLocation",
		"timeflow": "ORACLE_TIMEFLOW-123",
		"location": "3043123"
	},
	"type": "OracleProvisionParameters"
}
EOF