Is there API available to add environments?

  • 0
  • 1
  • Question
  • Updated 1 year 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

  • 486 Points 250 badge 2x thumb
  • sad

Posted 1 year ago

  • 0
  • 1
Photo of Jatinder Luthra

Jatinder Luthra, Employee

  • 3,958 Points 3k 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

  • 1,618 Points 1k 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

  • 6,126 Points 5k 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