---
title: "POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate"
method: POST
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate"
tags: ["ResourceGroups"]
---

# POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate

`POST /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate`

Captures the specified resource group as a template.

## Parameters

- `../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref
- `../../../../../common-types/resource-management/v1/types.json#/components/parameters/ResourceGroupNameParameter` — unresolved $ref
- `../../../../../common-types/resource-management/v1/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref

## Request body

- ExportTemplateRequest — Export resource group template request parameters.
  - `resources` string[] — The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'.
  - `options` string — The export template options. A CSV-formatted list containing zero or more of the following: 'IncludeParameterDefaultValue', 'IncludeComments', 'SkipResourceNameParameterization', 'SkipAllParameterization'

## Response `200`

OK - Returns the result of the export.

- ResourceGroupExportResult — Resource group export result.
  - `template` object — The template content.
  - `error` ErrorResponse — unresolved $ref

## Other responses

- `202` — Accepted
- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.dev/azure/apis/resourcemanagementclient.md) · [All operations](https://skmtc.dev/azure/apis/resourcemanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/resourcemanagementclient/revisions/917e67faecf0/schema)
