APIPythonOpen-Source Solutions

Expand all | Collapse all

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

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

    Posted 09-21-2017 03:57:00 PM


  • 2.  RE: Hi are there any examples of creating a mysql VDB through the api while specifying the port for the VDB
    Best Answer

    Posted 09-22-2017 08:26:00 AM
    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



  • 3.  RE: Hi are there any examples of creating a mysql VDB through the api while specifying the port for the VDB

    Posted 09-22-2017 02:07:00 PM
    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!