0
votes

In Azure ARM Portal, we have predefined and working Azure ARM Templates. But we are unable to find the REST API to retrieve all the Azure ARM Templates. Let me know if we have REST API for the same. Also I want to know these templates are stored under any storage account ?

1

1 Answers

0
votes

But we are unable to find the REST API to retrieve all the Azure ARM Templates

We can retrieve all the Azure ARM Templates in a resource group. Following is the way to do it.

Method and URL.

POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resourcegroup-name}/exportTemplate?api-version=2017-05-10

Sample request headers:

Host: management.azure.com
Authorization: Bearer your-token
Content-Type: application/json

Sample request body:

{
  "resources": [
    "*"
    ],
  "options": "IncludeParameterDefaultValue, IncludeComments"
}

Also I want to know these templates are stored under any storage account ?

It is not announced whether these templates will stored under any storage account or not.