---
title: Import and export policies
description: You can import and export policies to and from files.
component: pingam
version: 8.1
page_id: pingam:am-authorization:import-export-policy
canonical_url: https://docs.pingidentity.com/pingam/8.1/am-authorization/import-export-policy.html
keywords: ["Authorization", "Administration", "Policy"]
page_aliases: ["authorization-guide:import-export-policy.adoc"]
---

# Import and export policies

You can import and export policies to and from files.

You can use these files to back up policies, transfer policies between AM instances, or store policy configuration in a version control system such as Git or Subversion.

AM supports exporting policies in JSON and [eXtensible Access Control Markup Language (XACML) Version 3.0](http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html) format.

**Comparison of policy import/export formats**

| Feature                                                                                      | Supported for JSON? | Supported for XACML? |
| -------------------------------------------------------------------------------------------- | ------------------- | -------------------- |
| Can be imported/exported from within the AM admin UI?                                        | No                  | Yes                  |
| Can be imported/exported using REST?                                                         | Yes                 | Yes                  |
| Exports policies?                                                                            | Yes                 | Yes                  |
| Exports policy sets?                                                                         | Yes                 | Partial(1)           |
| Exports resource types?                                                                      | Yes                 | Partial              |
| Creates an exact copy of the original policy sets, resource types, and policies upon import? | Yes                 | Partial(2)           |

(1) Only the details of policy sets and resource types that are actually used within a policy are exported to the XACML format. The full definition is not exported.

(2) Policy sets and resource types will be generated from the details in the XML, but may not match the definitions of the originals. For example, the names are auto-generated.

|   |                                                                                                                                                                                                         |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | AM can only import XACML 3.0 files that were either created by an AM instance, or that have had minor manual modifications, due to the reuse of some XACML 3.0 parameters for non-standard information. |

Importing and exporting JSON:

* Export

  You export policies in JSON format by sending a GET request to the `policies` endpoint. This is the same request as the one detailed in [read a policy](rest-api-authz-policies.html#rest-api-authz-policies-read).

* Import

  You import policies in JSON format by sending a POST request to the `policies` endpoint. This is the same request as the one detailed in [create a policy](rest-api-authz-policies.html#rest-api-authz-policies-create).

Importing and exporting XACML:

* [Export to XACML](xacml-export.html)

* [Import from XACML](xacml-import.html)
