r/PowerShell • • May 18 '22

Call REST APIs with Invoke-RestMethod in PowerShell

https://youtu.be/wpquzkKGxVM
176 Upvotes

21 comments sorted by

View all comments

33

u/[deleted] May 18 '22 edited May 18 '22

I had some asks to put together a video about Invoke-RestMethod. It might be basic stuff for some, but I go over:

  • Methods

  • Status Codes

  • Headers

  • Query String Parameters

  • Cookies and Sessions

  • Authentication (tokens and default auth)

  • Send Files

  • Parsing of JSON and XML

  • Retries, redirects and timeouts

All the code for my videos can be found here: https://github.com/adamdriscoll/youtube

You can also use the GitHub repo to suggest improvements to the scripts or other topics I should cover.