Hi are there any examples of creating a mysql VDB through the api while specifying the port for the VDB

  • 0
  • 1
  • Question
  • Updated 12 months ago
  • Answered
Photo of Jason Man

Jason Man

  • 80 Points 75 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Jason Man

Jason Man

  • 80 Points 75 badge 2x thumb
Solved this issue by setting setopt trace=true and using the delphix CLI to extract the POST request.

DEIP="delphix.example.com"
STACK_NAME="example_stack"

PORT=3242

echo -e "\n\nCREATE VDB\n"

curl -X POST -k --data @- http://${DEIP}/resources/json/delphix/database/provision \
    -b ~/cookies.txt -H "Content-Type: application/json" <<EOF
{
"type": "MySQLProvisionParameters",
"container": {
"type": "MySQLDatabaseContainer",
"name": "${STACK_NAME}",
"group": "GROUP-34"
},
"source": {
"type": "MySQLVirtualSource",
"allowAutoVDBRestartOnHostReboot": false,
"mountBase": "/home/delphix/toolkit/provision/V/${STACK_NAME}"
},
"sourceConfig": {
"type": "MySQLServerConfig",
"repository": "MYSQL_INSTALL-16",
"port": ${PORT}
},
"timeflowPointParameters": {
"type": "TimeflowPointSemantic",
"container": "MYSQL_DB_CONTAINER-35",
"location": "LATEST_POINT"
}
}

EOF
Photo of Jaclyn Schoof

Jaclyn Schoof, Community Manager

  • 5,092 Points 5k badge 2x thumb
Hi Jason,
That definitely is a great way to get queries, you can also always check out the api guide built into your engine ().
Have a great day!
(Edited)