Management CLI APIs

About XPRESSO Management CLI APIs

XPRESSO provides the following public CLI APIs to assist with general management requirements and optional feature commands:

Help CLI APIs

All management CLIs support --help option, for example:

  • xpresso --help
  • xpresso command --help
  • xpresso command subcommand --help

XPRESSO login CLI APIs

  • description: user login to xpresso with credentials and register xpresso instance, group and token

  • mandatory arguments: none

  • optional arguments:

    --user:

    • description: user name; if not provided, CLI engine fetches user name from the system.
    • usage: xpresso login --user kel2

    --url:

    • description: xpresso instance url; if not provided, http://xpresso-sjc-1.cisco.com is used as the default.
    • usage: xpresso login --url https://xpresso-dev-1.cisco.com

    --instance:

    • description: instance name; if not provided, __CENTRAL__ is used as the instance name by default.
    • usage: xpresso login --instance my_xpresso_instance

XPRESSO config set CLI APIs

  • description: set/update user's default xpresso config settings

  • mandatory arguments: either --instance or --group; can not be specified both at the same time.

  • optional arguments:

    --instance:

    • description: set the default xpresso instance to be used in all CLI operations.
    • usage: xpresso config set --instance my_xpresso_instance

    --group:

    • description: set the default xpresso group for the default xpresso instance to be used in all CLI operations. The group needs to be registered in the xpresso instance.
    • usage: xpresso config set --group my_group

XPRESSO config list CLI APIs

  • description: list all XPRESSO instances (with registration info) that user logged in.

  • mandatory arguments: none

  • optional arguments: no specific options supported; refer to next topic for general arguments supported by all XPRESSO CLI APIs.

Optional XPRESSO arguments

All xpresso feature CLIs support the following optional arguments:

--help:

  • description: get CLI helps
  • usage: xpresso command (subcommand) --help

--json:

  • description: return a full detail Json format output; save to file if filename been provided
  • usage: xpresso command (subcommand) --json or xpresso command (subcommand) --json output.json

--instance:

  • description: specify the xpresso instance to run the CLI command
  • usage: xpresso command (subcommand) --instance instance_name

--group:

  • description: specify the xpresso group to apply the CLI command
  • usage: xpresso command (subcommand) --group group_name