Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Thomas_Starr
Explorer

mgmt_cli options reference (man page)

Hi all,

Currently missing from the Management API Reference is a full options list for mgmt_cli, a la man page.
I knew I'd seen the full options somewhere, eventually realising I'd seen them on the tool itself but not the web.

It doesn't have a help parameter, rather it is displayed on error.

mgmt_cli command-name command-parameters optional-switches


optional-switches:
---------------
[--batch, -b]
        Execute command using parameters file in .CSV format.
[--ca-cert]
        SSL CA Bundle file.
        Environment variable: MGMT_CLI_CA_CERT
[--client-cert, -c]
        Use this flag to provide path to the client P12 certificate file for login.
        Environment variable: MGMT_CLI_CLIENT_CERTIFICATE
[--conn-timeout]
        Defines maximum time the request is allowed to take in seconds.
        Default {180}
        Environment variable: MGMT_CLI_CONNECTION_TIMEOUT
[--context]
        Context of WebAPI.
        Default {web_api}
        Environment variable: MGMT_CLI_CONTEXT
[--debug] {on|off}
        Whether to run the command in debug mode.
        Default {off}
        Environment variable: MGMT_CLI_DEBUG
[--debug-header]
        A value of a debug header which is sent to the WebAPI server. Server log records will be marked by this value.
        Environment variable: MGMT_CLI_DEBUG_HEADER
[--domain, -d]
        Name, uid or IP-address of the management domain.
        Environment variable: MGMT_CLI_DOMAIN
[--format, -f] {text|text-partial|text-full|json}
        Response format
        Default {text}
        Environment variable: MGMT_CLI_FORMAT
[--ignore-errors] {true|false}
        Ignore errors and continue execution when executing commands from parameters file. See (--batch).
        Default {false}
        Environment variable: MGMT_CLI_IGNORE_ERRORS
[--log-file]
        Path to the debugging log file.
        Default {mgmt_cli.log}
        Environment variable: MGMT_CLI_LOG_FILE
[--management, -m]
        Management server ip address.
        Default {127.0.0.1}
        Environment variable: MGMT_CLI_MANAGEMENT
[--password, -p]
        Management administrator password.
        Environment variable: MGMT_CLI_PASSWORD
[--port]
        Port of WebAPI server on management server.
        Default {443}
        Environment variable: MGMT_CLI_PORT
[--proxy, -x]
        Proxy settings. Example: user:password@proxy.server:port
        Environment variable: MGMT_CLI_PROXY
[--root, -r] {true|false}
        When running on the management server, use this flag with value set to 'true' to login as Super User administrator.
        Default {false}
[--session-file, -s]
        File containing session information retrieved by login.
        Environment variable: MGMT_CLI_SESSION_FILE
[--session-id]
        Established session identifier (sid) using login.
        Environment variable: MGMT_CLI_SESSION_ID
[--sync] {true|false}
        Synchronous execution of task - commands that generate the task will wait until the task is finished.
        Default {true}
        Environment variable: MGMT_CLI_SYNC
[--sync-frequency]
        Defines (in seconds) how frequently task status should be checked when command is executed synchronously.
        Environment variable: MGMT_CLI_SYNC_FREQUENCY
[--treat-value-as-file-by-prefix]
        Treat the value field as a file name and read its content, if the value starts with this prefix.
        Environment variable: MGMT_CLI_TREAT_VALUE_AS_FILE_BY_PREFIX
[--unsafe] {true|false}
        UNSAFE! Ignore certificate verification.
        Default {false}
[--unsafe-auto-accept] {true|false}
        UNSAFE! Auto accept fingerprint during certificate verification.
        Default {false}
[--user, -u]
        Management administrator user name.
        Environment variable: MGMT_CLI_USER
[--version, -v]
        What command version should be called. By default the latest version is used.
        Environment variable: MGMT_CLI_VERSION
4 Replies
PhoneBoy
Admin
Admin

Agree this should probably be in the official documentation somewhere, but good that it's easily accessible.
0 Kudos
Don_Paterson
Advisor

Hi Dameon,

This is a helpful post and is the only place I have found the Unsafe switches documented.

I have sent an email to techpub about the sc1 API documentation not including this.

 

I have found that the 'command-name' API command does not appear to work (not for me anyway).
Is it still a valid API command.

The command 'command-name' is not working for me.

 

Thanks,

Don

0 Kudos
Stuart_Green1
Employee
Employee

Hi Don - that's just a placeholder for the structure of the tool. The commands should be like

 

mgmt_cli -u myuser -p mypassword show hosts --format json

 

Stu

 

0 Kudos
Don_Paterson
Advisor

Thanks Stu,

I get it now 🙂

I just had to run mgmt_cli on it's own to see all the arguments, options and switches listed.

It's a tip I give other people usually - to run a command on it's own to see the options...

Cheers,

Don

 

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events