Automating the GitHub REST API Using PowerShell
// Channel 9
Have you always wondered how to interact with REST APIs using PowerShell? If so, then wonder no more! During this video demonstration, we will take a look at using PowerShell's powerful Invoke-RestMethod command to call REST APIs! GitHub's interface is actually quite easy to use, because they support HTTP Basic Authentication, using pre-generated Personal Access Tokens. You don't need to worry about the oAuth authentication flow by using these special tokens! Even better, these tokens enable you to restrict which operations each token can perform, so even if one token is compromised, the scope of damage can be somewhat limited.
Throughout this video, we'll perform several common operations on GitHub, using their REST API from PowerShell:
- Authenticate using Personal Access Tokens
- Create new GitHub repositories
- Delete existing GitHub repositories
- Make updates to our GitHub user profile
This video was recorded and produced using PowerShell version 5.0 on Windows 10 RTM version 1511 by Trevor Sullivan, a Microsoft MVP for Windows PowerShell and the Microsoft Azure Curriculum Director at Cloud Academy. Visit Trevor's website at https://trevorsullivan.net and follow him on Twitter @pcgeek86. Thanks for watching!
IMPORTANT: Personal Access Tokens were harmed in the creation of this video. If this is a problem for you, then you are probably too close to your Personal Access Tokens.
Shared via my feedly reader
Sent from my iPad