Delphix Products

  • 1.  Migrate VDB using API

    Posted 03-19-2019 09:24:00 AM
    Hi there,
    Do we have a sample script for migrating a VDB through an API call?
    Regards
    #Virtualization


  • 2.  RE: Migrate VDB using API

    Posted 03-19-2019 10:30:00 AM
    To add, this is what I am using at 1.10.0 version:

    curl -s -X POST -k --data @- https://${DE}/resources/json/delphix/sourceconfig/ORACLE_SINGLE_CONFIG-61 \

        -b ~/cookies.txt -H "Content-Type: application/json" <<EOF

    {

        "type": "SourceConfig",

        "repository":"ORACLE_INSTALL-12"

    }




    And I am getting this error:

    {"type":"ErrorResult","status":"ERROR","error":{"type":"APIError","details":{"type":{"details":"Object type \"SourceConfig\" is an abstract type. Expected a concrete type derived from \"TypedObject\".","action":null,"id":"exception.validation.object.type.abstract","commandOutput":null,"diagnoses":null}},"action":"Check your input parameters and try again.","id":"exception.validation.bad.input","commandOutput":null,"diagnoses":null}}


  • 3.  RE: Migrate VDB using API



  • 4.  RE: Migrate VDB using API

    Posted 03-19-2019 04:37:00 PM
    Thanks Michael,
    Not able to move forward, that was a different API for creating a container while this is migrating. very similar error, but changing API version is not helping here.
    Are you able to provide a sample script please, I am using 5.3 upwards..
    Thanks in advance.



  • 5.  RE: Migrate VDB using API

    Posted 03-19-2019 04:39:00 PM
    I will reach out internally and see what I can find out. Hang tight.

    Thanks,
    Michael


  • 6.  RE: Migrate VDB using API
    Best Answer

    Posted 03-19-2019 05:22:00 PM
    So, in talking with our Oracle team, there does not seem to be a single call to do this. It is a combination of 3 calls, first to disable, next to update info, third to enable/startup again.

    It's not an operation directly on the api,  It's the combination of disable, update sourceconfig and enable again
    here is an example of the api calls to do a migrate
    POST /resources/json/delphix/source/ORACLE_VIRTUAL_SOURCE-1/disable
    {
       "type": "OracleDisableParameters"
    }


    POST /resources/json/delphix/sourceconfig/ORACLE_SINGLE_CONFIG-2 {
       "type": "OracleSIConfig",
       "environmentUser": "HOST_USER-1",
       "repository": "ORACLE_INSTALL-2"
    }

    POST /resources/json/delphix/source/ORACLE_VIRTUAL_SOURCE-1/enable
    {
       "type": "OracleEnableParameters"
    }

    3 posts, first to disable, second to update the user and repository to point to the new environment, and third to enable it again and start it up in the new environment
    Hope this helps.
    Michael


  • 7.  RE: Migrate VDB using API

    Posted 03-19-2019 05:24:00 PM
    Thanks Michael.


  • 8.  RE: Migrate VDB using API

    Posted 05-09-2019 08:30:00 PM
    This discussion has been captured and redesigned as a knowledge article and published here: https://support.delphix.com/Delphix_Virtualization_Engine/Delphix_Admin/Migrating_VDB_Using_an_API_Call_(KBA3809)