Migrate VDB using API

  • 0
  • 1
  • Question
  • Updated 1 month ago
  • Answered
Hi there,
Do we have a sample script for migrating a VDB through an API call?
Regards
Photo of EnterpriseMan

EnterpriseMan

  • 630 Points 500 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Photo of EnterpriseMan

EnterpriseMan

  • 630 Points 500 badge 2x thumb
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}}
Photo of MichaelT

MichaelT, Official Rep

  • 2,026 Points 2k badge 2x thumb
Hi EnterpriseMan,
I saw that your error was handled in a different thread, here https://community.delphix.com/delphix/topics/create-container-api-fails-if-version-is-1-10-0-but-is-fine-when-incorrect-version-1-8-0-is. Are you still looking for a sample script, or are you able to move forward?

Thanks,
Michael
Photo of EnterpriseMan

EnterpriseMan

  • 630 Points 500 badge 2x thumb
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.

Photo of MichaelT

MichaelT, Official Rep

  • 2,026 Points 2k badge 2x thumb
I will reach out internally and see what I can find out. Hang tight.

Thanks,
Michael
Photo of MichaelT

MichaelT, Official Rep

  • 2,026 Points 2k badge 2x thumb
Official Response
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
Photo of EnterpriseMan

EnterpriseMan

  • 630 Points 500 badge 2x thumb
Thanks Michael.