Coding, How to

Azure API Management: PowerShell Reporting & Cache Hit Ratio

I was recently working with a customer who needed to view the cache hit ratio of an Azure API Management instance. Currently the UI dashboard doesn’t report this information, however there is a lovely API which you can call.

As we needed something up and running fast PowerShell seemed like the perfect way to quickly retrieve the JSON and convert it into an object then format it nicely. The script also stores the results to disk so we have a copy to hand.


Here is the resulting little script.


To use this on your instance replace the URL and SharedSigniture with your own. You can get these from the administration portal for APIM under the security tab.

For full details on what you can do with the rest API head here for the docs.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s