Is there API available to add environments?

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

  • 444 Points 250 badge 2x thumb
  • sad

Posted 5 months ago

  • 0
  • 1
Photo of Jatinder Luthra

Jatinder Luthra, Employee

  • 2,754 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.

https://docs.delphix.com/docs51/reference/web-service-api-guide

~Thanks
Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 1,314 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): 
https://github.com/delphix/dxtoolkit

https://github.com/delphix/dxtoolkit/releases

Best Regards
Gianpiero
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,682 Points 4k badge 2x thumb
Hi,

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": "172.16.160.133", "toolkitPath": "/var/opt/delphix/toolkit" } }}EOF

Regards,

Mouhssine