Multiple inputs on RestAPI call

Last post 06-14-2018, 3:38 PM by Shane_Hicks. 2 replies.
Sort Posts: Previous Next
  • Multiple inputs on RestAPI call
    Posted: 06-14-2018, 3:32 PM

    I was looking at pinned post about the webcall to the API and it works great. What would the line look like if I had multiple inputs.

    My current line

    $Result = Invoke-RestMethod -Method GET -Uri "$WebServer/wapi/Decomm_client?ClientName=SERVER" -Headers $headers

  • Re: Multiple inputs on RestAPI call
    Posted: 06-14-2018, 3:35 PM
    If the REST API call asks for multiple inputs via the URL (GET request), you can add it on as such:

    $Result = Invoke-RestMethod -Method GET -Uri "$WebServer/wapi/Decomm_client?ClientName=$Param1&Key2=$Param2&Key3=$Param3"
  • Re: Multiple inputs on RestAPI call
    Posted: 06-14-2018, 3:38 PM

    Thank you very much!

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2020 Commvault | All Rights Reserved. | Legal | Privacy Policy