API for V2P for oracle dsource

  • 0
  • 2
  • Question
  • Updated 6 months ago
  • Answered
Hi All,

Just want to know any API is available for V2P provision or we can do it only through the CLI mode.

Thanks in advance.


Regards,
Swathy
Photo of Swathy Sukumar

Swathy Sukumar

  • 886 Points 500 badge 2x thumb

Posted 9 months ago

  • 0
  • 2
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,862 Points 4k badge 2x thumb
Hi Swathy, 

Yes, you can via a call to this webservice "POST /resources/json/delphix/database/export"

Please cf. for more information "https://docs.delphix.com/docs/reference/web-service-api-guide/gui-api-mapping

Regards,

Mouhssine
Photo of anshul gupta

anshul gupta

  • 466 Points 250 badge 2x thumb
Can u please provide request and response json?
Photo of Gary Hallam

Gary Hallam, Official Rep

  • 2,104 Points 2k badge 2x thumb
Hi Swathy,
You should be able to use the API for this.
Check the opensource dxToolkit available here for some examples. https://github.com/delphix/dxtoolkit/
Regards,
Gary
Photo of anshul gupta

anshul gupta

  • 466 Points 250 badge 2x thumb
Hi Gary, Github is not accessible here. Can u please provide request and response json?
Photo of Gary Hallam

Gary Hallam, Official Rep

  • 2,104 Points 2k badge 2x thumb
Hi Anshul,
I don't have anything to hand, though I have made a request internally.
Best thing for you to do would be to log into the CLI using delphix_admin and then turn on the options for JSON format and tracing.  Run the V2P commands from the CLI and these two options should give you all the JSON you will need to build the commands yourself.
setopt trace=true       <-- Should give you the request.
setopt format=json    <-- Should give you the response.

Details for setopt here.  It's described as CLI to Web Services Transition.
Details for V2P in the CLI here.

Good luck and let me know how you got on.  If I get hold of the JSON in the meatime I'll forward to you.

Regards,
Gary
Photo of Gary Hallam

Gary Hallam, Official Rep

  • 2,104 Points 2k badge 2x thumb
I’ve been kindly supplied this snippet also:

sean5240.dc4 database export *> commit
=== POST /resources/json/delphix/database/export ===
{
"type": "OracleExportParameters",
"timeflowPointParameters": {
"type": "TimeflowPointSemantic",
"container": "ORACLE_DB_CONTAINER-5"
},
"sourceConfig": {
"type": "OracleSIConfig",
"repository": "ORACLE_INSTALL-4",
"databaseName": "v2ptest",
"uniqueName": "v2ptest",
"instance": {
"type": "OracleInstance",
"instanceNumber": 1,
"instanceName": "v2ptest"
}
},
"filesystemLayout": {
"type": "TimeflowFilesystemLayout",
"targetDirectory": "/mnt/provision/v2ptest/",
"dataDirectory": "/mnt/provision/v2ptest/data",
"archiveDirectory": "/mnt/provision/v2ptest/archive",
"externalDirectory": "/mnt/provision/v2ptest/external",
"tempDirectory": "/mnt/provision/v2ptest/temp",
"scriptDirectory": "/mnt/provision/v2ptest/script"
}
}
Photo of Swathy Sukumar

Swathy Sukumar

  • 886 Points 500 badge 2x thumb
Hi All,

While i am trying to execute the code through the CLI mode where i am giving my directory path as the 

set filesystemLayout.targetDirectory=/tmp/V2P_db

i am getting error stating as :Connection to host "10.130.25.138" is temporarily lost during export of "oracle_1".    Connection to host "10.130.25.138" is closed during export of "oracle_1".
    DB_EXPORT job for "unknown" suspended due to recoverable error: "Could not create directory "/tmp/datafiles/ORACLE_1/onlinelog" on the remote host "10.130.25.138".".
  Action: Address the error condition and then resume the job to continue execution.

Thanks in advance

Regards,
Swathy
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,862 Points 4k badge 2x thumb
Hi Swathy,

Please ensure that your delphix user have all required permission on the export directory (rwx)

Regards,

Mouhssine