Atlassian CLI Reference - 6.1.0

On this page

Related information for 6.1.0

Actions

Action

Category

Description

Required parameters

Optional parameters

Output formats

1

bamboo

 

Use the Bamboo CLI client to run an action.

common

 

 

2

bitbucket

 

Use the Bitbucket CLI client to run an action.

common

 

 

3

confluence

 

Use the Confluence CLI client to run an action.

common

 

 

4

crucible

 

Use the Crucible CLI client to run an action.

common

 

 

5

fisheye

 

Use the FishEye CLI client to run an action.

common

 

 

6

getClientInfo

Info

Get information about the this client tool.

 

outputFormat, file, append, encoding

1 - basic
2 - JVM

7

hipchat

 

Use the HipChat CLI client to run an action.

common

 

 

8

jira

 

Use the JIRA CLI client to run an action.

common

 

 

9

runFromCsv

CSV

Run actions generated from a CSV file.

file

common, propertyFile, continue, quiet, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

10

runFromList

Run

Run actions for each entry in a list. 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. Available replacement variables are entry, entry2.

list

list2, file, common, continue, quiet, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

11

runFromSql

Run

Run actions generated by SQL provided by the sql parameter, a file, or standard input

sql or file or standard input

common, driver, database, host, port, url, dbUser, dbPassword, propertyFile, continue, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

12

run

Run

Run actions from a file or standard input.

file or standard input

common, continue, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

13

servicedesk

 

Use the Service Desk CLI client to run an action.

common

 

 

14

upm

 

Use the UPM CLI client to run an action.

common

 

 

Parameter Tips

Common parameters

A few common parameters are available that are not specifically listed as optional parameters for each action: helpverbose, 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, dbJarhost, portdbCreateTable, 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.

PositionCharacterCharacter nameSuggested alternateUsage
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 escaping on your OS command terminal. Non standard characters will result in an authorization error similar to: User is not authorized to perform the request.

 

Parameters

Parameter

Short

Value

Description

Parameter

Short

Value

Description

1

action

a

 

2

afterSql

 

SQL to run after a successful action. Limited to specific actions at this time.

3

append

 

For some actions using the file parameter, append will append output to the existing file.

4

bambooServer

 

Server parameter for Bamboo actions.

5

bitbucketServer

 

Server parameter for Bitbucket actions.

6

clearFileBeforeAppend

 

For run actions, this option will automatically clear an existing file on the first append requested.

7

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.

8

comment

 

Comment text.

9

common

 

Common parameter string added to all run actions.

10

confluenceServer

 

Server parameter for Confluence actions.

11

connectionTimeout

 

Allow overriding environment settings for connect and read timeouts on URL connections. In milliseconds, 0 means infinite.

12

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.

13

crucibleServer

 

Server parameter for Crucible actions.

14

database

 

Database name is required for SQL actions.

15

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.

16

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.

17

dbCreateTable

 

Database table needs to be created before adding rows.

18

dbJar

 

By default, lib/jdbc is used to automatically load database drivers. Otherwise you can specify a specific file or url reference for the database driver jar. Example /jdbcDrivers/postgresql-9.3-1102.jdbc41.jar or

https://jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc41.jar

 

19

dbPassword

 

Database user password. Defaults to password.

20

dbTable

 

Database table name when creating or updating a database from list output.

21

dbTableKeys

 

Comma separated list of column names used to access existing rows for update. Normally this defines a primary key set for the table.

22

dbUser

 

Database user name. Defaults to user.

23

debug

 

Requests detail debug output. Optional for all actions.

24

driver

 

JDBC driver class or predefined value: postgresql, mysql, mssql, oracle, or db2400. Required for SQL actions.

25

encoding

 

Character encoding (character set) for text based file content - must be an encoding supported by your JAVA platform.

26

file

f

Path to file based content or result output. Use - for standard input.

27

findReplace

 

Find and replace text. Comma separated list of colon separated pairs. Single quote values containing a delimiter. Embedded quotes must be escaped.

28

findReplaceRegex

 

Find and replace text with a regular expression. Comma separated list of colon separated pairs. Single quote values containing a delimiter. Embedded quotes must be doubled.

29

fisheyeServer

 

Server parameter for FishEye actions.

30

help

 

Prints this help message.

31

hipchatServer

 

Server parameter for HipChat actions.

32

host

 

Database host server for SQL actions. Not used if url is provided. Defaults to localhost if not provided.

33

jiraServer

 

Server parameter for JIRA actions.

34

list

 

Comma separated list of entries to populate the entry replacement variable on runFromList. Single quote values containing a delimiter. Embedded quotes must be doubled.

35

list2

 

Comma separated list of entries to populate the entry2 replacement variable on runFromList. Single quote values containing a delimiter. Embedded quotes must be doubled.

36

outputFormat

 

Specify output format for an action. (default: 1)

37

parameters

 

Client specific parameters.

38

password

p

User password for remote access.

39

port

 

Database host port for SQL actions. Optional, defaults to database default. Not used if url is provided.

40

propertyFile

 

Property file with database parameters, field mappings, or client specific information.

41

quiet

 

Limit some output messages. Optional for all actions.

42

reference

 

Reference to a replacement key value used to remember an action specific value like issue key or similar so it can be referenced later.Each action that allows this parameter will specify what value is being set for the reference replacement key.

43

replace

 

Replace existing entity on add, create, or similar actions.

44

servicedeskServer

 

Server parameter for Service Desk actions.

45

simulate

 

Simulate running actions. Log the action that would be taken.

46

special

 

Ordered list of alternate characters for comma ( , ), colon ( : ), at ( @ ), quote ( ' ), and double quote ( " ) characters used for specialized processing of some specific parameters.

47

sql

 

SQL select statement used to generate a run script.

48

upmServer

 

Server parameter for UPM actions.

49

url

 

Action specific setting. Example: Database access url for SQL actions. Optional when host is provided.

50

user

u

User name for remote access.

51

verbose

v

Requests verbose output to help with problem determination. Optional for all actions.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.