Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Robert_Decker
Advisor

R80 Management API tips and tricks - Using environment variables

When running the mgmt_cli tool, it reads many of its activation parameters from environment variables.

This is useful when using automation scripts. It is supported both on Windows and Linux machines.

Here is a list:

Parameter NameCommand Line SwitchEnvironment Variable
User name-uMGMT_CLI_USER
User password-pMGMT_CLI_PASSWORD
Name or IP address of management domain-dMGMT_CLI_DOMAIN
Management server IP address-mMGMT_CLI_MANAGEMENT
Port of API server on management server--portMGMT_CLI_PORT
Proxy settings-xMGMT_CLI_PROXY
File containing session information using Login-sMGMT_CLI_SESSION_FILE
Established session identifier (sid) using Login--session-idMGMT_CLI_SESSION_ID
API response format-fMGMT_CLI_FORMAT

For example, on Linux machine use - 

export MGMT_CLI_USER=me
export MGMT_CLI_PASSWORD=secret
export MGMT_CLI_MANAGEMENT=1.1.1.1

Then call the Login command - 

mgmt_cli login

If you are writing a script to automate your tasks, you can save the password obscured, and then un-obscure in script just before calling the login command.

Robert.

0 Replies

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Tue 24 Feb 2026 @ 04:30 PM (EST)

    Las Vegas: MDR/XMDR

    Wed 25 Feb 2026 @ 04:30 PM (MST)

    Tempe, AZ: MDR/MXDR

    Wed 11 Mar 2026 @ 12:00 PM (MDT)

    CheckMates Live Denver!
    CheckMates Events