How it works...
You began by installing the great Polaris module from the PowerShell gallery and examining its contents.
In Step 2, you experienced that RESTful APIs usually define different routes to get to information. You can do this with Polaris for different verbs like GET, POST, PUT, PATCH, or DELETE. You started with a new get route that will later point to http://localhost/events.
In Step 3, you looked at the route's script block, examining the request. The event log name can be sent in the query or in the request body, as you can see in the code. In Step 4, you saw the automatic variable, $request, which contains the entirety of your request data. This allowed you to parse other values that we would like to see, such as the FilterXPath ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access