JAEN

PowerShell

Invoke-RestMethod

CautionCall REST APIs

Invoke-RestMethod <url>

Calls APIs and auto-parses JSON into objects (irm) — the API counterpart to iwr. Automation's workhorse.

Examples

  • irm https://api.example.com/status | select stateRead a status field

Syntax

Invoke-RestMethod <uri> [-Method POST] [-Body json] [-Headers @{}]

Before you run it

Mutating methods really mutate.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store