Blog Series: APIs and Powershell

Starting out on helpdesk and moving to systems administration, I never had any exposure to APIs and how to use them. I would be in meetings and people would start talking about APIs and this would be me.

Instead of being clueless, I would rather know a little bit when people smarter than me start talking. So I set out to start learning what exactly can be done with APIs and Powershell.

 

Powershell Tools for Accessing APIs

Some of the tools provided in Powershell I will be discussing in this series are:

Invoke-WebRequest
Invoke-RestMethod

ConvertTo-JSON
ConvertFrom-JSON

Setting a variable to accept XML response
$somevariable =

Parsing HTML for results as well as posting HTML data.

And possibly more as I come across of.

Data Data Everywhere, But What to Do With It?

Getting the data wasn’t good enough for me. In those API discussions I mentioned previously, I have yet to see someone say getting the data was good enough. So these posts will also include posting the data to Azure Log Analytics, SQL, and maybe Azure CosmosDB. Once we have the data in a platform we can run queries and alert on issues and a lot more.

 

The Posts

Accessing Weather Underground API to get JSON result
Post Weather Data to Azure Log Analytics

Comparing Invoke-RestMethod to Invoke-WebRequest
Invoke-RestMethod vs Invoke-WebRequest

Using Powershell to parse HTML and XML to send data to Azure Log Analytics
Monitor your BBQ with Powershell and Azure Log Analytics

How to use Powershell to Post data into your Database in Cosmos DB
POST to Cosmos DB REST API with Powershell

Hi, I’m Billy York.  I work in Cloud and Datacenter, specializing in monitoring and automation. Here you’ll find posts about System Center Operations Manager, Powershell, Hyper-V, Azure Automation, Azure Log Analytics and other Microsoft related technologies.

2 thoughts on “Blog Series: APIs and Powershell

Comments are closed.