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 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82

    Tue 23 Apr 2024 @ 11:00 AM (EDT)

    East US: What's New in R82

    Thu 25 Apr 2024 @ 11:00 AM (SGT)

    APAC: CPX 2024 Recap

    Tue 30 Apr 2024 @ 03:00 PM (CDT)

    EMEA: CPX 2024 Recap

    Thu 02 May 2024 @ 11:00 AM (SGT)

    APAC: What's new in R82
    CheckMates Events