- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- R80 Management API tips and tricks - Using environ...
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×
Sign in with your Check Point UserCenter/PartnerMap account to access more great content and get a chance to win some Apple AirPods! If you don't have an account, create one now for free!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 Name | Command Line Switch | Environment Variable |
---|---|---|
User name | -u | MGMT_CLI_USER |
User password | -p | MGMT_CLI_PASSWORD |
Name or IP address of management domain | -d | MGMT_CLI_DOMAIN |
Management server IP address | -m | MGMT_CLI_MANAGEMENT |
Port of API server on management server | --port | MGMT_CLI_PORT |
Proxy settings | -x | MGMT_CLI_PROXY |
File containing session information using Login | -s | MGMT_CLI_SESSION_FILE |
Established session identifier (sid) using Login | --session-id | MGMT_CLI_SESSION_ID |
API response format | -f | MGMT_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
