Call Microsoft Azure REST API using Postman. Azure REST API helps in managing Azure resources from any client application. Get the list of resource groups. This is part 3 of the series “Create Azure Resource Manager Bot“.
Representational State Transfer (REST) APIs are service endpoints that support sets of HTTP operations (methods), which provide create, retrieve, update, or delete access to the service’s resources.
For more information. Refer to Microsoft Documentation.
- Download Postman
- Service Principal in Azure – To know how to create service principal, go through my post on Creating Service Principal using PowerShell.
Import Postman Collection
Getting Access Token
Follow part 2 of the series How to get Azure Access Token using Postman. Complete part 2. This is in continuation of part 2.
Get All Resource Group Details using REST API
Before calling Get Resource Groups, first Get the AAD token as you saw in Part 2. Once Token is generated, select Get Resource Groups.
Send the Get request. The response you get is the list of all resource groups in your subscription.
Create Resource Group using REST API
Click on Environment Quick Look after select the environment from the dropdown.
Click on Edit and give a new variable “resourceGroup”. Also, provide the name of the resource group you want to create.
Update the environment variable. Then select Create Resource Group from the collection. Give the location in the body of the Request and send the PUT request.
Below is the success response you get.
For all Azure REST APIs, refer to Microsoft Documentation.