Creating volume components from existing ZD&T or instances
Learn about the steps to create volume components from existing ZD&T or instances.
Procedure
-
Call the REST API to authenticate the SSH connection to the z/OS® system.
curl -k -u wibadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "system-uuid": "systemuuid", "username": "zosuser", "password": "zospw"}' 'https://your_tools_server_host_name:9443/wibrest/zdtrs/auth-services/v3/authenticate-ssh'
-
Call the REST APIs to get the information on all volumes for a specific z/OS system. Put the token from above call into the authorization header.
curl -k -u wibadmin:password -X GET --header 'Accept: application/json' --header 'SSHAuthorization: {"token":"VVNFUjM1NTE4MTkwMzg4MzI=","hostname":"YOUR_Z_OS_HOST_NAME","port":22} ' 'https://your_tools_server_host_name:9443/wibrest/zdtrs/zdt-services/volumes?uuid=systemuuid'
The following response is displayed.{”zosAllVolumes“: [{"id":0,"name":"A27AAA","extractionTime":"1960-01-01 23:03:20","deviceNumber":"048C","deviceType":"3390","progress":0,"compressed":0,"size":1892010960},{"id":0,"name":"A27CCC","extractionTime":"1960-01-01 23:03:20","deviceNumber":"04BE","deviceType":"3390","progress":0,"compressed":0,"size":2838016440},{"id":0,"name":"A45SYS","extractionTime":"1960-01-01 23:03:20","deviceNumber":"0492","deviceType":"3390","progress":0,"compressed":0,"size":8514049320},…], ”zosInfo“:{ "sysinfo":{"loadsuf":"AU",...}, "disks":[...],...} }
- Call the REST API to authenticate the SSH connection to the Linux® system that is running the ZD&T or instance.
curl -k -u wibadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "hostname": "YOUR_LINUX_HOST_NAME", "port": 22,"username": "LinuxUSER", "password": "LinuxPW"}' 'https://your_tools_server_host_name:9443/wibrest/zdtrs/auth-services/v2/authenticateSSH'
-
Create the component by providing the authentication to the Linux system. The authentication needs to include your selected volumes, and the whole
"zosInfo" structure in the "zsystemInformation" section that is returned from step 2 GET VOLUME
call.
curl -k -u wibadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'SSHAuthorization: {"token":"VVNFUjM1NTE4MTkwMzg4MzI=","hostname":"YOUR_LINUX_HOST_NAME","port":22} ' -d '{ "name": "testComp-fromLinux", "zSystem": { "hostname": "YOUR_Z_OS_HOST_NAME", "port": 2022 }, "systemType": "COMP_SYSTEM_TYPE_ZDT_ENV", "description": "comp_desc", "volumes": [ { "name": "A27AAA" } , { "name": "MVS220" } ] , "schedules":{"originalScheduleTime": "2018-01-06 13:01:00.0","originalScheduleTimezoneId": "CTT"}, "concurrentExtractionNumber": 3, "ftpSystem": {"hostname": "your.image.storage.com", ”zsystemInformation“:{ "sysinfo":{"loadsuf":"AU",...}, "disks":[...],...} } }' 'https://your_tools_server_host_name:9443/wibrest/zdtrs/componentServices/zdt-volume'