Test Data Manager

 View Only
  • 1.  Powershell Script with API calls

    Posted Jan 19, 2021 07:13 AM
    Hi,

    Good evening!

    I am trying to make few updates in Keith's Powershell script and tried in my machine, but it is not fetching me response. I am not sure if my inputs are correct.
    Could you please validate my powershell script and the response and kindly help troubleshooting the issue?

    Thanks in advance for your kind help!

    Notepads attached:
    1. Powershell script
    2.  Cmd line response

    Thanks
    Rama

    Attachment(s)

    txt
    Response in Command.txt   3 KB 1 version
    txt
    TDMAPIExample.txt   6 KB 1 version


  • 2.  RE: Powershell Script with API calls

    Broadcom Employee
    Posted Jan 19, 2021 07:48 AM
    Hi,

         I think the issue is the URL can you please try this command.  https instead of http

    powershell -file TDMAPIExample.ps1 -username administrator -password marmite -url https://X.X.X.X:8443 -ProjectName "TOSCA_DemoWebShop_DataGen" -Version 1.0 -Environment Demowebshop




    ------------------------------
    Regards

    Keith Puzey
    Client Services Consultant | Enterprise Software Division
    Broadcom
    ------------------------------



  • 3.  RE: Powershell Script with API calls

    Posted Jan 19, 2021 08:32 AM
    Thank you so much, Keith! :)

    This worked. :)  I got the output.    

    Project ID for Project name TOSCA_DemoWebShop_DataGen is 2366
    Version ID for Version 1.0 is 2367
    Environment ID for Environment Demowebshop is 315

    I am trying add some scripts in this to fetch the data (using reservation API service).  I will get back to you if i see any issues. 
    Kindly share if you have any powershell script handy already for fetch data using this API, - /api/ca/v1/testDataModels/{testDataModelId}/actions/find

    Thanks much!

    Regards
    Rama