Konect CLI
The Konect command line interface (CLI) is a unified tool that provides a consistent interface for importing and exporting data and configuration from the Konect cloud.
The Konect CLI requires a valid API key with access to the required environments to run. Konect API keys can be created in the Konect portal by an account administrator (when the organisation has a valid license).
Installation
The Konect CLI is a 64 bit portable .NET application. It currently supports 64 bit Windows 10 and 11 or Windows Server 2016 and above. An installer for the Konect CLI can be downloaded from here:
Previously (version 1.1.1) the Konect CLI was distributed as a zip file containing the executables. Multiple versions of the Konect CLI can be installed side by side.
Command structure in the Konect CLI
The Konect CLI uses a multipart structure on the command line that must be specified in this order:
The base call to the
konectprogram.The top-level command, which corresponds to an import or export.
The parameter -k [API_KEY] that specifies the key to allow the Konect CLI to work with your organisation.
The parameter -e [ENVIRONMENT_NAME] that specifies the environment the Konect CLI will work with.
General Konect CLI parameters or flags required by the command type. You can specify these in any order as long as they follow the first two parts.
$ konect <command> -k [API_KEY] -e [ENVIRONMENT_NAME] [parameters and flags]
Parameters
Parameters are passed to the Konect CLI by specifying 2 minus symbols and the parameter name or 1 minus symbol and the parameter abbreviation character followed by the value/s separated by spaces. Not all parameters have an abbreviated version. The key and environment parameters shown above are examples of abbreviated parameters.
Parameter values that have spaces need to be qualified with double quotes around the value.
"value with space"
Parameter values that include double quotes, need the double quotes to be escaped with either a backslash or 2 double quotes.
"my \"quoted\" value""my ""quoted"" value"
Parameters that can take more than 1 value need to be separated by spaces
value1 value2 "quoted value"
Flags
Flags are parameters that do not have values, but are either on or off. An omitted flag is off, while an included flag is on. For example including --photos would tell the CLI to download photo fields during an export, omitting the flag defaults to not download photos during an export.
Usage text
Executing just the base Konect CLI program will display a usage text with all available commands.
$ konect
Executing just the base Konect CLI program and the command will display usage text for the given command.
$ konect <command>
Example usage
Options file
For users that hit the command line maximum character limit an extra command is available allowing you to pass all the parameters to the CLI via an options file. The options command takes a single parameter -o with the path to the options file
$ konect options -o path_to_options_file
The options file is a text file that needs to contain all the command line parameters including the command on a single line. The file can be created with a text editor of your choice such as notepad.