3.2.15.2.2. Command line options for settings

Warning

This API is deprecated.

Axonius API v2 is now available, we recommend you move to API v2.

New features will no longer be added to this API. Axonius will only provide bug fixes.

Read about API v2

This way you won’t be prompted for the values of each setting, which will allow you to automate adding a new connection.

Some adapters, like the CSV adapter, have multiple workflows that make the settings for connections all optional, when really in order for any given workflow to work correctly, you need to provide some settings that are marked as optional.

The “user_id” setting is the only one marked as required by the CSV adapter. However, if we want to upload a file we need to supply the optional “csv” setting.

We can solve for that by supplying those items on the command line using “-c / –config setting=value”.

We also supply “-npo / –no-prompt-opt” to not be prompted for all of the other settings. We could use “-sk / –skip setting_name_regex” instead to skip specific settings.

$ axonshell adapters cnx add --adapter csv \
  --export-file cnxadded.json \
  --config user_id=dvcs_from_axonshell \
  --config csv=dvc.csv \
  --no-prompt-opt