Creating data set components from z/OS for projects defined in IBM AD with REST APIs

Learn about the steps to create components from IBM® Application Discovery by using REST API.

  1. Call the REST API to authenticate the SSH connection to the z/OS® system.
    curl -k -u zvdtadmin: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/ZVDTREST/zvdtrs/auth-services/v3/authenticate-ssh
    The following response is displayed.
    {"token":"cm9vdC02NjQ3ODgxMTY="}
  2. Call the REST API to get the list of AD servers that are defined in ZD&T.
    curl -k -u zvdtadmin:password -X GET --header 'Accept: application/json' https://your_tools_server_host_name:9443/ZVDTREST/zvdtrs/integration-services/ad-servers
  3. Call the REST API to get the list of AD project that is defined in AD by providing the uuid of the selected AD server.
    curl -k -u zvdtadmin:password -X GET --header 'Accept: application/json' https://your_tools_server_host_name:9443/ZVDTREST/zvdtrs/integration-services/ad-projects/e3c9166d-3d2f-4c4f-8a88-a440826b2973
  4. Call the REST API to get the list of data sets for a specific project that is defined in a specific AD server, by providing the uuid of the AD server and project.
    curl -k -u zvdtadmin:password -X GET --header 'Accept: application/json' https://your_tools_server_host_name:9443/ZVDTREST/zvdtrs/integration-services/ad-project-datasets/ad/{uuid}/projects/{project-uuid}
  5. Create the component by including your selected data sets returned from above call. Put the token from the first call into the authorization header.
    curl -k -u zvdtadmin:password -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'SSHAuthorization: {"token":"dXNlcjM1NTg5OTg4OTgwNA==","hostname":"YOUR_Z_OS_HOST_NAME","port":22} '-d '{   "name": "testDsComp-fromLinux",   "zSystem": { "hostname": "YOUR_Z_OS_HOST_NAME", "port": 22 },   "systemType": "COMP_SYSTEM_TYPE_ZSYSTEM_USER", "description": "ds_comp", "dataSets": [   { "name": "SYS1.A39AAA.LPALIB" },  { "name": "SYS1.AFOMMOD1" }, { "name": "SYS1.A45AAA.LINKLIB"}   ], "schedules":{"originalScheduleTime": "2018-01-06 13:01:00.0","originalScheduleTimezoneId": "CTT"}, "concurrentExtractionNumber": 3, "ftpSystem": {"hostname": "your.image.storage.com"} }' https://your_tools_server_host_name:9443/ZVDTREST/zvdtrs/componentServices/zosDatasetComponent