The author say that Polaris is “a cross-platform, minimalist web framework for PowerShell.”
This framework allows it to easily build your own RESTful webservice with only PowerShell. Polaris is free, open source, and also written in PowerShell.
The project is hosted on GitHub. Tyler Leonhardt together with Micah Rairdon and other members in the community are maintaining the project actively.
The following terms are good to be known when working with REST.
Representational State Transfer (REST) provides a standardized interface commonly used for machine-to-machine communication.
CRUD abbreviates Create, Read, Update, and Delete. A (REST) API usually provide these common set of functions.
The process of allocating a HTTP method to a webservice function is called mapping.
the table below shows a common practice:
|REST method||Webservice function|
PowerShell offers easy handling with ConvertFrom-Json and ConvertTo-Json.
Consumption via Squared Up
The WEB API TILE from Squared Up allows to read data from a REST service and shows it on a Dashboard. With Polaris you can now query any data source that provides a PowerShell interface to pass it’s information to a dashboard.
Concrete examples will follow.
A while ago I blogged on 4sysops an example of using Polaris. It helps to get a first understanding on how it works.