Connecting to target environments with REST APIs
To connect to target environments, you can use 'curl' to call REST APIs.
About this task
To connect to target environments by using 'curl' to call REST APIs, you need to use your own setup variables to replace the following italic text. For more information on the descriptions and available values of each field, refer to the REST API specification at the following URL:
https://<your-tools-server-host-name>:9443/api/explorer/
Procedure
Configure the connection to the target environments if you want to provision instances
from created images to Linux® environments.
curl -k -u zdtadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "hostname": "your_target_system_host_name", "sshPort": 22, "label":"zdtForTesting", "installOSPackages": true, "concurrentVolumeTransferNumber": 3, "configNetwork": true, "configUser": true, "syntax": "sudo ${command}", "syntaxForValidation": "sudo -n -l", "networkInterface": "eth1", "tcpPortRules": "0:21 \n 23:2021 \n 2022>22 \n 2023:3269 \n 3271:9449 \n 9452:65535", "udpPortRules": "111 \n 514 \n 1023 \n 1044:1049 \n 2049", "zdtManaged": "true", "hasRootAccess": "true"}' 'https://your_tools_server_host_name:9443/ZDTREST/zdtrs/targetEnvServices/targetSystem'