Reference
Actions
Action | Description | Required Parameters | Optional Parameters | Category | Type | Examples |
---|---|---|---|---|---|---|
copyFile | Copy text data from the source file. Use the file parameter to direct output to a file. When append is used, data will be appended to the target file. If requested, find and replace logic will be applied to the source data before processing. Also, replacement variables will automatically be replaced with their value. |
| ||||
convertCsv | Convert CSV file data from the source file. Use the file parameter to direct output to a file. Default behavior is to produce a simple HTML table. Customized HTML output is possible using a property file. Other output types are available with the outputType parameter. Valid values are: text, table, html, json, variables. Optionally provide subset and order columns using the columns parameter. Subset and order columns using the columns parameter. If requested, find and replace logic will be applied to the source data before processing. | columns, augments, headingAugments, select, options, outputType, findReplace, findReplaceRegex, findReplaceScope, propertyFile, input, file, append, encoding | ||||
copyCsv | Copy csv data from the source file. Use the file parameter to direct output to a file. When append is used, only data rows (not the header row) will be copied. If provided, only columns identified by the columns parameter will be included in the order specified. If requested, find and replace logic will be applied to the source data before processing. Note that if database parameters are provided, the CSV data can be loaded into a database table just like support provided by list actions. | columns, augments, headingAugments, select, options, findReplace, findReplaceRegex, findReplaceScope, outputType, file, append, encoding | ||||
getClientInfo | Get information about this client. |
| outputFormat, file, limit, regex, append, encoding, columns, select, options | |||
getReplacementVariableList | Get a list of replacement variable names and values with regex filtering on name. This action is only useful within a run script where replacement variables are remembered. |
|
| |||
getUpgradeInfo | Get information about upgrades available for this client. |
|
| |||
help | Show general help information for the client including actions and parameters. When used on a partial action string, action specific help will be shown. |
|
|
| ||
provideFeedback | Provide feedback, comments, and suggestions to ACLI developers based on your experience with the product. We appreciate all feedback in the spirit of continuous improvement in helping customers with their tasks. For specific product issues and immediate help, please submit a request to our support portal at https://bobswift.atlassian.net/servicedesk. |
|
| |||
renderRequest | Render URL based request. URL can be a partial URL. The response data is returned optionally modified by findReplace processing. Use '--pretty' to format returned JSON data in a more readable form. Also, for JSON data, you can use '--options setReplacementVariables'. | requestType, data, contentType, acceptType, findReplace, findReplaceRegex, file, encoding, header |
| |||
run | Run actions from a file, list of input parameters, or standard input (default). Use one or more field parameters to set replacement variables that can be used in run script actions. This makes it possible to parameterize the script so it can be applied to more general use cases. For example, '--field project=MYPROJECT'. This capability is available for all run type actions. |
| file, input, common, continue, simulate, field, file, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex | |||
runFromCsv | Run actions generated from a CSV file. The default behavior is that each column name that matches a valid parameter for the client generates a parameter with value matching the column value for the row being process. Alternatively, use '--options setReplacementVariables' to change the behavior to set a replacement variable whose key (case sensitive) is the column name with blanks removed and whose valid is the value matching the column value for the row being processed. | propertyFile, common, input, continue, simulate, field, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex |
| |||
runFromJson | Run actions based on JSON data used for replacement variables and list processing based on standard Json paths specified for list and list2 parameters. Valid JSON data must be provided using the data parameter or file parameter. Actions can be specified using input, common, or file (when not used for data) parameters. Replacement variables are defined from the JSON data using JsonPath naming convention with dot separators. See the JsonPath reference at https://github.com/json-path/JsonPath/blob/master/README.md. | list, list2, continue, simulate, field, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex, options |
| |||
runFromList | Run actions for each entry in a list with corresponding entry replacement variable. When file is provided, each action in the file augmented by the common parameter will be run for each entry. Otherwise, just the action specified by the common parameter will be run. When available, list2 entries provide values for the entry2 replacement variable. By default, the entry2 replacement variable is set in parallel with entry replacement variables for each action run. However, if '--options listProcessing=serial' is specified, each combination of entries from list and list2 will cause an action to run. Use one or more field parameters to set replacement variables that can be used in run script actions. This makes it possible to parameterize the script so it can be applied to more general use cases. For example, '--field project=MYPROJECT'. | list2, continue, simulate, field, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex, options | ||||
runFromPropertyFile | Run actions for each entry from a (Java) property file. | continue, simulate, field, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex, options |
| |||
runFromSql | Run actions generated by SQL provided by the sql parameter, a file, or standard input. The default behavior is that each column name that matches a valid parameter for the client generates a parameter with value matching the column value for the row being process. A special case is if the value of the first column starts with a '-', then the entire row will be treated as a single action. Alternatively, use '--options setReplacementVariables' to change the behavior to set a replacement variable whose key (case sensitive) is the column name, with blanks removed, and whose valid is the value matching the column value for the row being processed. | database, url, dbUser, dbPassword, propertyFile, common, input, continue, simulate, field, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex |
| |||
runIf | Run actions only if a regex based condition is met. Other parameters and behavior are the same as the run action. By default the regex is used for a find of the value parameter. Options parameter can be set to one or more of the following to modify the default behavior: literal - to treat the regex string as a literal string, exact - to require an exact match of the value, negative - to reverse the condition so a match means do NOT run action. Use one or more field parameters to set replacement variables that can be used in run script actions. This makes it possible to parameterize the script so it can be applied to more general use cases. For example, '--field project=MYPROJECT'. | value, options, common, continue, simulate, field, encoding, clearFileBeforeAppend, findReplace, findReplaceRegex |
| |||
setReplacementVariables | Set one or more replacement variables specified using field parameters with name=value syntax or loaded from a property file. Value specified replaces any previously set variable with the same name including values set by other actions that set replacement variables. This is an example to save a previously set value: --field myIssue=@issue@. Find and replace logic is applied to the value before setting the variable providing a way to manipulate values in a script. Variables are available only within the scope of the run script they were set in. |
|
| |||
sleep | Sleep a number of seconds. Defaults to 1 second. Use in CLI scripts that may need to wait before proceeding to the next action. For instance, waiting for server to complete updating search indexes or polling type scenarios. |
|
|
Parameters
Parameter | Short | Value | Multiple Use Allowed | Description |
---|---|---|---|---|
--type |
|
| Content type for renderRequest. | |
--acceptType |
|
| Content type to accept for renderRequest if different than contentType. | |
--action | a |
| Requested operation to perform. Valid actions are listed separately. | |
--afterSql |
|
| SQL to run after a successful action. Limited to specific actions at this time. | |
--append |
|
| For some actions using the file parameter, append will append output to an existing file. | |
--augments |
|
| Comma separated list of augments to data rows. | |
--clearFileBeforeAppend |
|
| For run actions, this option will automatically clear an existing file on the first append requested. | |
--columns |
|
| Column selection and ordering when action generates CSV output. A comma separated list of column numbers (1-based) or column names (case insensitive). Only columns provided by the selected outputFormat are available for selection. Invalid columns will be ignored. | |
--comment |
|
| Comment text. | |
--common |
|
| Common parameter string added to all actions in the run script. | |
--connectionTimeout |
|
| Allow overriding environment settings for connect and read timeouts on URL connections. In milliseconds, 0 means infinite. | |
--contentType |
|
| Content type for post data for a web request. Any suitable value can be specified. We have defines some special values for commonly used types: JSON, HTML, XML, URL_ENCODED, FORM_URL_ENCODED. | |
--continue |
|
| Continue processing even after errors are encountered for run actions. Also used for some action to ignore certain errors like not found errors on remove actions and already exists errors on add actions. | |
--data |
|
| JSON data for runFromJson. Post data for renderRequest. Action specific definition in some cases. | |
--database |
|
| Database name or reference to a ACLI configuration entry when proceeded with an @ symbol. When referencing a configuration entry, the entry should contain appropriate parameters for for defining access to the database including url and, when necessary, dbUser and dbPassword authentication parameters. | |
--dateFormat |
|
| Format string for dates in Java SimpleDateFormat. Default for output is client date format. Default for date parsing is lenient starting with client date format and then some other standard formats based on JSON date format. | |
--dateFormat2 |
|
| Alternate format string for dates in Java SimpleDateFormat. Use specific (may be ignored), but normally used for date only fields to avoid longer dateFormat based output. Some uses default to yyyy-MM-dd. | |
--dbCreateTable |
|
| Automatically create the database table before adding rows. | |
--dbJar |
|
| CLI has built-in support for Postgres and by default loads database drivers found in the CLI installation's lib/jdbc directory. Otherwise you can specify a specific file or URL reference for the database driver jar. Examples /jdbcDrivers/postgresql-42.2.19.jar or https://jdbc.postgresql.org/download/postgresql-42.2.19.jar | |
--dbPassword |
|
| Database user password. Defaults to password. | |
--dbTable |
|
| Database table name when creating or updating a database from list output. | |
--dbTableKeys |
|
| Comma separated list of column names used to access existing rows for update. Normally this defines a primary key set for the table. CLI automatically defaults unique keys specific for the action. | |
--dbUser |
|
| Database user name. Defaults to the same as the user parameter. | |
--debug |
|
| Requests detail debug output especially useful for Support. Optional for all actions. Recommend first using verbose logging for problem determination. | |
--driver |
|
| JDBC driver class or predefined value: postgresql, mysql, mssql, oracle, db2, or db2400. Normally automatically determined for many databases based on url parameter. | |
--encoding |
|
| Character encoding (character set) for text based file content - must be an encoding supported by your Java platform. | |
--field |
| true | Use to set client and construct specific fields or variables using name=value syntax. The first equal sign (=) delineates the name from it's value. This provides a more convenient and expandable alternative for setting fields or variables and is the recommended approach. Values are trimmed unless single quoted and single quoted strings will have single quotes removed. | |
--file | f |
| Path to file based content or result output. For some action it may be a directory path. Use - for standard input. Use + for getting lines from 'input' parameters (deprecated). | |
--findReplace |
| true | Successively find and replace matching text with the find and replace values specified using find:replace syntax. The first colon (:) delineates the find value from the replace value. Single quote values containing a colon and then escape embedded quotes. Legacy support for a comma separated list deprecated in 9.0 has been removed in 9.3. You must now always use multiple parameters. | |
--findReplaceRegex |
| true | Successively find and replace matching text with the find and replace values specified using find:replace syntax. The first colon (:) delineates the find value from the replace value. Single quote values containing a colon and then escape embedded quotes. The find value must be a valid regular regular expression and the replace value can contain replacement variables for capture groups like $1, $2, and so on. For some command shells, the $ may need to be escaped. Legacy support for a comma separated list deprecated in 9.0 has been removed in 9.3. You must now always use multiple parameters. | |
--findReplaceScope |
|
| Option for setting where to apply the find replace logic. Options are: 'file' (default), or 'header-cells', or 'data-cells'. | |
--header |
| true | Custom request header added to remote requests. Allows for unique headers required in some environments or needed for specific requests. Header values may be sensitive like for authentication headers, so header values are masked in debug data similar to passwords and tokens. | |
--headingAugments |
|
| Comma separated list of augments to heading rows. | |
--help |
|
| Shows a help message. | |
--host |
|
| Deprecated. Not needed when using the url parameter. Database host server for SQL actions. Defaults to localhost. | |
--input | i | true | Line of input used in place of file data for run actions. One or more input parameters are used as lines instead of using the file parameter. In some cases requiring a file parameter, it may be necessary to use a special value of + to indicate to use the input parameters instead. | |
--limit |
|
| Maximum number of list entries to return. Some actions or environments may impose a smaller default limit. | |
--list |
|
| Comma separated list of entries to populate the entry replacement variable on runFromList. Single quote values containing a comma. Embedded quotes must be escaped. | |
--list2 |
|
| Comma separated list of entries to populate the entry2 replacement variable on runFromList. Single quote values containing a comma. Embedded quotes must be escaped. | |
--name |
|
| Name of an item or entity. | |
--options |
| true | Client or action specific advanced options. Use multiple times for multiple option settings or a comma separated list. | |
--outputFormat |
|
| Specify output format for a list actions. Output format determines what columns are retrieved for the list. More columns usually take longer to retrieve. | |
--outputType |
|
| CSV output from get list actions and pretty print output from get actions can optionally be converted to plain text, HTML, or json based on the value of this parameter. Get actions also support the variables output type to set replacement variables for use in a CLI run script. Valid values are: text, table, html, json, variables. | |
--port |
|
| Deprecated. Not needed when using the url parameter. Database host port for SQL actions. Defaults to database default. | |
--pretty |
|
| Format JSON output in a more readable form. | |
--propertyFile |
|
| Property file with database parameters, field mappings, or client specific information. | |
--quiet |
|
| Limit some output messages. Optional for all actions. | |
--reference |
|
| Reference to a replacement key value used to remember an action specific value like issue key, entity id, or similar so it can be referenced later. Each action that allows this parameter will specify that the reference parameter is valid for the action and the first entry listed for available replacement variables help text will be the value set. If you need access to a different replacement variable in your script, you will need to use setReplacementVariable action after the action to set a new replacement variable of your choosing to one of the other available replacement variables. | |
--regex |
|
| Regular expression for condition matching or list filtering. | |
--replace |
|
| Replace existing entity on add, create, or similar actions. | |
--requestParameters |
|
| Additional url request parameters append to the url for the renderRequest action. Use the data parameter for request post data for POST and PUT requests. | |
--requestType |
|
| Type of a render request like GET, POST, PUT, DELETE, PATCH, HEAD. | |
--select |
| true | Used for row selection by column value on list actions. The first colon (:) in the parameter value delineates the column name or number from a regex selection pattern. Each row's column value is used with the regex pattern to determined row inclusion in the final result. By default, row is included if the regex pattern is found in the column value. The options parameter can be set to one or more of the following to modify the default behavior: literal - to treat the regex string as a literal string, exact - to require an exact match of the value (not just a find!), negative - to reverse the condition so a match means exclude the row. Row selection takes place after all other action specific filtering conditions including the limit determination and so generally should not be used with the limit parameter. | |
--simulate |
|
| Simulate running actions. Log the action that would be taken. | |
--sourceFile |
|
| Source CSV file. | |
--special |
|
| Ordered list of alternate characters for comma ( , ), colon ( : ), at ( @ ), quote ( ' ), and double quote ( " ) characters used for specialized processing of some specific parameters. | |
--sql |
|
| SQL select statement used to generate a run script. | |
--url |
|
| Action specific setting. URL or partial URL for renderRequest. Database access URL for SQL related actions. URL for application link related actions. | |
--value |
|
| Field value or condition value for matching. | |
--verbose | v |
| Requests verbose output to help with problem determination. Optional for all actions. |
Parameter Tips
Common parameters
A few common parameters are available that are not specifically listed as optional parameters for each action: help, verbose, debug, quiet, special, dateFormat, dateFormat2, and outputType. Similarly for database related parameters that are optional for all get list actions: url, dbUser, dbPassword, database, driver, dbJar, host, port, dbCreateTable, dbTable, dbTableKeys, afterSql, and propertyFile.
Tips
- To get help for a specific action, type the action followed by --help - example: --action getProjectList --help
- Use double dash for multi-letter parameters - example: --help
- Use single dash for single letter parameters indicated in the Short column in parameter help - example: -v
- When parameters are specified, most need a value as indicated by a check in the Value column in parameter help - example: --action addPage
- Some parameters are flags (boolean) and must not be followed by a value - example: --verbose
- Parameter names are case sensitive, but, action values are not - example: --userid is invalid but --action addpage is equivalent to --action addPage
- An incorrect case parameter will result in an unknown parameter error and show action help with correctly cased parameter (9.8 or higher)
- Some parameters become required once a specific action is chosen. This is indicated in the action help text as required.
- Some parameters have both short (one letter) and long (more than one letter) parameter names - example: -a or --action are the same and cannot both be specified
- Some parameters have default values, if so, they are indicated in the help text
- Values that contain blanks or some special characters (platform specific) must be enclosed by double quotes - example: --title "this is my title"
- Quoting rules in commands can vary by terminal environment
:
- Windows command terminals or run action scripts for all platforms: embedded double quotes within a double quoted string must be escaped by doubling the double quote - example: –common "-a addComment --comment ""This is an example of a double quoted string inside a double quote"" "
- Linux and Mac/OSX command terminals require standard Linux style escaping: embedded double quotes within a double quoted string can be escaped with a \ - example: –common "-a addComment --comment \"This is an example of a double quoted string inside a double quote\" "
- Run CLI Actions usage: embedded double quotes within a double quoted string can be escaped by doubling the double quote (first example above)
- A single quote sometimes can used in place of a double quotes on some command terminal environments - example: –common '-a addComment --comment "This is an example of a double quoted string inside a double quote" '
- Some parameters allow entry of a comma separated list of values, values containing a comma must be enclosed in single quotes - example: --custom "'first:a,b,c', second:x". Embedded single quotes within a quoted string must be doubled
- Some text fields support the automatic conversion of " \n " (blanks are significant) to be replaced with a new line character - example: --description "A multi-line text field: \n # line 1 \n # line 2"
Special parameter
Some special characters are difficult to deal with or make action text very complicated. This is because they have special meaning in either the OS command terminal handling, the tool's command line parsing, or the tool's use of separators (like comma or colon separated lists). As a convenience to avoid some of these nasty situations, a special parameter was implemented to allow alternate characters to be used instead of (or in addition to) the problematic characters within parameter values. The choice of what special characters to use depends on the content so that you do not have conflicts with intended content. The special parameter works by the user providing a order specific alternate character. The alternative character is replaced with the real character after all other parsing occurs. It is implemented for many action parameters that are problematic in this area. Not all situations are covered, but, that will improve as other use cases are identified.
Position | Character | Character name | Suggested alternate | Usage |
---|---|---|---|---|
1 | , | comma | Some parameters use comma separated lists. | |
2 | : | colon | # | Some parameters use colon separated values. |
3 | @ | at sign | Replacement variables syntax: @...@. | |
4 | ' | single quote | Used in separated lists to cover cases where content contains separator. | |
5 | " | double quote | ~ | Parameters containing blanks. |
6 | ^ | caret | Substitution double quote indicator: ^^...^^. See ACLI-673 for details. |
A blank in any position is ignored (no alternate provided).
Example: –special " # ~" provides alternates for colon and double quote.
--common "--findReplace ~something to find containing a : (colon)#replacement~"
Character Set
User and password values should be in the ISO-8859-1 character set. Also avoid characters that require escapging on your OS command terminal. Non standard characters will result in an authorization error similar to: User is not authorized to perform the request.