Link to home
Start Free TrialLog in
Avatar of jay_waugh
jay_waughFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Make a REST call using Powershell

Hi,

I am a complete novice with REST APIs but have managed to connect to one using SOAPUI.

My next step is that I need to perform a similar connection using a powershell script.

So I need to connect using a Post method.

1. Obtain the authorization value
2. Use the value obtained as part of the authorization request as a "Request parameter" to make a Post call by using a pre-defined variable.
3. Use a further parameter to specify the data format i.e. json
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

This may help; it explains the use of the Invoke-WebRequest cmdlet you can use for your POST request
https://stackoverflow.com/questions/17325293/invoke-webrequest-post-with-parameters
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
#a42504338 describes how the particular requirements will vary depending on the API service you're connecting to, and that documentation for that API will describe how you need to supply information.

Beyond that, everything is just examples of <b>possibilities</b>.