# APIs as Objects: \`Invoke-RestMethod\`

Invoke-RestMethod asks a web API for data and turns its JSON answer into objects, so a weather forecast arrives ready for Select-Object, Where-Object and the rest of the pipeline, and query parameters after a ? in the address ask for exactly what you want.

![Cheat sheet for the lesson APIs as Objects: \`Invoke-RestMethod\`: Invoke-RestMethod asks a web API for data and turns its JSON answer into objects, so a weather forecast arrives ready for Select-Object, Where-Object and the rest of the pipeline, and query parameters after a ? in the address ask for…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/214293834e3a42d787ba3755e602ef8e.webp)

- Category: PowerShell
- Level: Journeyman
- Tags: API, invoke-restmethod, JSON, powershell, Query String
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-invoke-restmethod-cheat-sheet
