Is there API available to add environments?

  • 0
  • 1
  • Question
  • Updated 2 weeks ago
  • Answered
I was going through Delphix 5.1.9 documentation and could not find any API for the same. If available, kindly provide the link. Thanks in advance.
Photo of anshul gupta

anshul gupta

  • 194 Points 100 badge 2x thumb
  • sad

Posted 2 weeks ago

  • 0
  • 1
Photo of Jatinder Luthra

Jatinder Luthra, Employee

  • 2,576 Points 2k badge 2x thumb
Hello Anshul,
                   Here is the link to Delphix 5.1 API. You will find under "Reference" section of Delphix documentation.

Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 780 Points 500 badge 2x thumb
The rest api docs for the 5.2.0
The API should be the same.
You can get the list of the API on your Engine installation at the http://[ip]/api

I suggest you also the dxtoolkit (a conveninet wrapper):

Best Regards
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 3,746 Points 3k badge 2x thumb

Sample code to customize and add after creating session and login to the engine

curl -X POST -k --data @- ${BaseURL}/environment -b "${COOKIE}" -H "${CONTENT_TYPE}" <<EOF{ "type": "HostEnvironmentCreateParameters", "primaryUser": { "type": "EnvironmentUser", "name": "delphix", "credential": { "type": "PasswordCredential", "password": "delphix" } }, "hostEnvironment": { "type": "UnixHostEnvironment", "name": "Linux Host" }, "hostParameters": { "type": "UnixHostCreateParameters", "host": { "type": "UnixHost", "address": "", "toolkitPath": "/var/opt/delphix/toolkit" } }}EOF