Use the importPolicyTemplates command to import the policy templates contained in a previously created export file. The policy templates to import are taken from the file provided by the -i parameter, or from stdin if no such file is specified.

By default, this command replaces all existing templates that are older than the imported templates.

Command syntax

btmcli importPolicyTemplates [-i inputFile]
                      [-replace ALL | all | NEWER | newer | NONE | none]
                      [-v] -s sphereUrl -l username:password
Name Long Name Description
-i -inputFile The name of the file containing the data to be imported.
-replace -replacementLevel Determines the outcome when an imported policy template matches an existing policy template in the system:

ALL: replace all existing policy templates.

NEWER: replace existing policies that are older than imported policy templates. (Default.)

NONE: do not replace any existing policy templates.

-v -verbose Display more detailed information about command execution.
-s -sphereUrl The URL of the sphere.


This flag is not required if you have set the AP_SPHERE_URL environment variable for your sphere.

-l -userLogin The username and password associated with the sphere, in the format: username:password. This set of credentials must belong to a user in the btmadmin role.

See Security Options in Accessing CLI Commands for information on furnishing login credentials.

You can encrypt passwords using the encryptPassword command.


The following example shows the importPolicyTemplates command used to import data from MyPolicyTemplates.

btmcli importPolicyTemplate -inputFile MyPolicyTemplates -replace NONE
                            -s http://localhost:8080/btmcentral/sphere/
                            -l admin:abracadabra