Help Center

Exporting/importing agents properties using Management Console API


You can export and then import the following agent's information and properties agent nameagent tagsagent groupsagent wan optimization status to CSV file. Note that since you cannot create agents via API (you can connect them using generated config file only) you need to have the same agent names on "fresh" management console where you will import data from CSV file. To get API wrapper script - please contact us.

***

1) Preparing
2) Exporting
3) Importing

***

Preparing

1) Install python3.5 and pip (or make sure you have them installed):

sudo apt-get install -y python3.5 python3-pip

Install requests module (or make sure you have it installed):

sudo python3.5 -m pip install requests

2) Make sure you have a license that allows to use API: Settings -> General -> License

Screenshot_from_2017-07-26_12-16-39.png

3) Go to Settings -> API -> Create New Token

Screenshot_from_2017-07-26_12-21-51.png

4) Once token is created - copy it in the clipboard:

Screenshot_from_2017-07-26_12-28-22.png

5) Now you can export current parameters for all agents: tags, groups, wan optimization statuses

***

Steps to export current settings (on Ubuntu Linux)

First of all make sure you have all required packages installed.

Export current configuration:

python3.5 main.py -a export -u connect.example.com -p 8443 -t MVHORUIEMBLSKUJSEPSMSDJSDFP -f export.csv -c false

Where:

connect.example.com - either domain name or IP address of management console server

8443 - API port (the same as webUI port)

WG7NQUQQZJWHAHHX2OQQ4GTUUK2ISIDZ - generated API token

export.csv - path to CSV file to be created and filled (in such case export.csv  file will be created near main.py file).

-c false - means 'doesn't check TLS certificate on management console'

For more information see help:

python3.5 main.py --help

CSV file has this format according to RFC4180.

***

Steps to import current settings (on Ubuntu Linux)

Make sure you have all required packages installed. It's the same as for exporting but with -a import parameter:

python3.5 main.py -a import -u connect.example.com -p 8443 -t WG7NQUQQZJWHAHHX2OQQ4GTUUK2ISIDZ -f export.csv -c false -r true

-r true - means 'remove existing groups if they are not in CSV file'

For more information see help:

python3.5 main.py --help

Script will add tags to corresponding agents by their names, will create groups with names and descriptions from CSV file and will push agents to created groups.

Note: since you cannot create agents via API (you can only connect them using config file) - you need to have agents with the same names as in CSV file in your "fresh" management console.

 

Was the article helpful? Yes / No, send feedback on article Thanks!


Please note that we won't mail you back. This is just purely feedback on the article above. If you need help from our Support Team, please use the "Contact Support" link at the top of the page.