Reference - 4.3.0

On this page

Related information for 4.3.0

Actions

Action

Category

Description

Required parameters

Optional parameters

Output formats

1

addAgentAssignment

Agent Assignments

Assign a project, plan, or job to a specific agent. This makes the agent is dedicated to only perform builds for all assignments. Use continue to ignore already exists error.

agent, assignment

continue

 

2

addAgent

Agents

Add a local agent.

agent

description

 

3

addArtifactDependency

Artifacts

Add an artifact dependency a job. Artifact must be a shared artifact from another job.

plan, job, artifact, location

 

 

4

addArtifact

Artifacts

Add an artifact definition to a job. Server instances only.

plan, job, artifact, copyPattern

location, shared

 

5

addComment

Comments

Add a comment to a build.

build, comment

number, findReplace, findReplaceRegex, file, encoding

 

6

addJob

Jobs

Add a job to a stage.

plan, stage, job

name, description, disable

 

7

addLabels

Labels

Add a comma separated list of labels to a build.

build, labels

number

 

8

addRepository

Repositories

Add a global or plan repository. For a plan repository, you can reference a linked (global) repository. Otherwise a valid repository key or alias is required. Valid aliases are: BITBUCKET, CVS, GIT, GITHUB, MERCURIAL, PERFORCE, STASH, SUBVERSION

repository or name

plan, repositoryKey, replace, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

9

addRequirement

Requirements

Add requirement to a plan job.

plan, job, requirement

type, value

 

10

addStage

Stages

Add a stage to a plan.

plan, stage

description, manual, disable

 

11

addTask

Tasks

Add a task to a plan job. A valid task key or alias is required. Valid aliases are: ANT, CHECKOUT, CLI_BAMBOO, CLI_CONFLUENCE, CLI_CRUCIBLE, CLI_FISHEYE, CLI_HIPCHAT, CLI_JIRA, CLI_STASH, GANT, GINT, GRADLE, GRADLEW, GROOVY, MAVEN2, MAVEN3, SCRIPT

plan, job, taskKey

disable, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

12

addTrigger

Triggers

Add a trigger to a plan. Valid types are: polling, remote, scheduled. One or more repositories can be specified for triggers based on repositories. See the schedule parameter for accepted values. Server instances only.

plan, name, type

repository, schedule, ipRestriction

 

13

addVariables

Variables

Add global or plan variables.

 

plan, replace fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

14

clonePlan

Plans

Clone a plan.

plan, toPlan, name

description, projectName, disable

 

15

cloneProject

Projects

Clone each plan in a project to another project. If toProject is not provided, the plans will be cloned to the same project. If the toProject does not exist, it will be created with name provided by projectName.

project, toProject, projectName, disable

 

 

16

createPlan

Plans

Create a new plan. Provide a 2-part plan key where the first part is the project key. If the project key does not exist, it will be created with the provided project name. Server instances only.

plan

name, projectName, description, disable

 

17

deletePlan

Plans

Delete a plan.

plan

 

 

18

deleteProject

Projects

Delete project and all project plans.

project

file

 

19

disableAgent

Agents

Disable an agent.

agent

 

 

20

disableJob

Jobs

Disable a job from running.

plan, job

 

 

21

disablePlan

Plans

Disable a plan from running.

plan

 

 

22

disableProject

Projects

Disable all project plans.

project

 

 

23

enableAgent

Agents

Enable an agent.

agent

 

 

24

enableJob

Jobs

Enable a job to run.

plan, job

 

 

25

enablePlan

Plans

Enable a plan to run.

plan

 

 

26

enableProject

Projects

Enable all project plans.

project

 

 

27

getAgentList

Lists

Get a list of agents based on regex filtering of agent names..

 

regex, file, append, encoding, columns

1 - basic
2 - detail

28

getArtifact

Artifacts

Download a copy of a build artifact into a file.

build, artifact, file

number

 

29

getBuildList

Lists

Get a list of builds. Default limit is 25.

plan

limit, favorite, labels, issues, columns, file, append, encoding

1 - basic
2 - test information

30

getBuildQueueList

Lists

Get a list of builds waiting in the build queue. Subset by project or build.

 

project, build, file, append, encoding, columns

 

31

getBuild

Builds

Get build result.

build

number, expand, file

 

32

getClientInfo

Info

Get information about the this client tool.

 

outputFormat, file, append, encoding

1 - basic
2 - JVM

33

getCommentList

Lists

Get a list of comments for a build.

build

number, file, append, encoding, columns

 

34

getJobList

Lists

Get a list of jobs for a plan with regex filtering on job key or name. Subset by stage if desired.

plan

stage, regex, file, attribute, columns

 

35

getLabelList

Lists

Get a list of labels for a build.

build

number, file, append, encoding, columns

 

36

getLatestBuildNumber

Builds

Get the number of the last completed build for this plan.

plan

 

 

37

getPlanList

Lists

Get a list of plans for a project with regex filtering on plan key or name. Use @all for project to get a list of plans across all projects.

project

favorite, regex, columns, file, append, encoding

 

38

getPlan

Plans

Get plan information.

plan

 

 

39

getProjectList

Lists

Get a list of projects. Projects are selected based on regex filtering on project key or name. Legacy list support is deprecated and will be removed in the near future.

 

regex, file, append, encoding, columns

 

40

getRepositoryList

Lists

Get a list of global or plan repositories with regex filtering on repository name.

 

plan, regex, file, append, encoding

 

41

getRepository

Repositories

Get details of a global or plan repository. Sets the repository and repositoryId replacement variables.

repository

plan

 

42

getServerInfo

Info

Get information about the Bamboo server.

 

outputFormat, dateFormat, file, append, encoding

1 - basic
2 - detail

43

getStageList

Lists

Get a list of stages for a plan with regex filtering on stage name.

plan

regex, file, attribute, columns

 

44

getVariableList

Lists

Get a list of global or plan variables based on regex filtering of variable names.

 

plan, regex, file, append, encoding

 

45

queueBuild

Builds

Queue a build to run. If wait is specified, the action will not complete until the queued build completes or the timeout period elapses. The action will fail if the build fails unless continue parameter is used to ignore a failed result. A specific revision can be built if the revision parameter is specified. Plan variables can be set using the field and value parameters.

plan

revision, wait, continue, timeout, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

46

removeAgentAssignment

Agent Assignments

Remove an assignment from a specific agent. Use continue to ignore not found error.

agent, assignment

continue

 

47

removeAgent

Agents

Remove an agent.

agent

 

 

48

removeArtifact

Artifacts

Remove an artifact definition from a job. Server instances only.

plan, job, artifact

 

 

49

removeLabels

Labels

Remove labels from a build. Labels can be a comma separated list or regex. Either build or search terms (searchLabels, issues) must be provided

labels

build, number, searchLabels, issues, favorite

 

50

removeRepository

Repositories

Remove global or plan repository. Use @all to remove all repositories.

repository or id

plan, continue

 

51

removeRequirement

Requirements

Remove a plan requirement.

plan, job, id

 

 

52

removeStage

Stages

Remove a stage from a plan. Use id = -1 to remove all stages. Use continue to ignore not found errors.

plan, stage or id

continue

 

53

removeTask

Tasks

Remove a task from a plan job. Use id = -1 to remove all tasks.

plan, job, id

 

 

54

removeTrigger

Triggers

Remove a trigger from a plan. Use id = -1 to remove all triggers. Server instances only.

plan, id

 

 

55

removeVariables

Variables

Remove global or plan variables

 

plan, fields, field1, field2, field3, field4, field5, field6

 

56

renderRequest

Render

Render url based request. The response data modified by findReplace processing is returned.

request

requestParameters, requestType, type, acceptType, build, file, encoding, findReplace, findReplaceRegex

 

57

runFromAgentList

Run

Run actions for each agent with regex filtering on agent name. Available replacement variables are agent and agentId.

 

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

 

58

runFromCsv

Run

Run actions generated from a CSV file.

file

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

 

59

runFromJobList

Run

Run actions for each job with regex filtering on job key or name. Restrict to a specific stage or leave stage blank to get jobs across all stages. Available replacement variables are project, projectName, plan, planName, stageId, stageName, job, and jobName.

plan

stage, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex

 

60

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 variable is entry.

list

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

 

61

runFromPlanList

Run

Run actions for each plan with regex filtering on plan key or name. Use @all for project to get a list of plans across all projects. Available replacement variables are project, projectName, plan, and planName.

project

favorite, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex

 

62

runFromProjectList

Run

Run actions for each project with regex filtering on project key or name. Available replacement variables are project and projectName.

 

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

 

63

runFromRepositoryList

Run

Run actions for each repository with regex filtering on repository name. Available replacement variables are repository and repositoryId.

 

plan, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex

 

64

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

 

65

runFromStageList

Run

Run actions for each stage with regex filtering on stage name. Available replacement variables are project, projectName, plan, planName, stageId, and stageName.

plan

stage, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex

 

66

run

Run

Run actions from a file or standard input.

file or standard input

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

 

67

updateRepository

Repositories

Update a global or plan repository.

repository or id

plan, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

68

updateRequirement

Requirements

Update a plan requirement.

plan, job, id

type, value

 

69

updateTask

Tasks

Update a task in a plan job. You must provide the same parameters as if you were creating the task.

plan, job, id

enable, disable, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

70

updateVariables

Variables

Update existing global or plan variables

 

plan fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6

 

71

validateLicense

 

Validates the CLI Connector is enabled and licensed on the server.

 

 

 

72

verifyBuild

Builds

Verify build was successful.

build

number

 

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

1

acceptType

 

(tick)

Content type to accept for renderRequest if different than type.

2

action

a

(tick)

 

3

agent

 

(tick)

Agent name.

4

api

 

(tick)

API version. Some requests produce different results based on the api version used. (default: latest)

5

append

 

(error)

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

6

artifact

 

(tick)

Build artifact name. May be extended by a path name for locating files within an artifact representing a dirctory.

7

assignment

 

(tick)

Key used to identify a project, plan, or job to be assigned to a specific agent. This makes the agent dedicated to only perform builds for all assignments. Example: XXX, XXX-DEF, XXX-DEF-JOB1

8

attribute

 

(tick)

Attribute to list.

9

build

 

(tick)

Build key. Normally used to refer to a specific build (3 part name). However, it was also an older terminology for a plan and some action continue to accept the older terminology. Example: XXX-DEF or XXX-DEF-1

10

clearFileBeforeAppend

 

(error)

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

11

columns

 

(tick)

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.

12

comment

 

(tick)

Comment for an build.

13

common

 

(tick)

Common parameter string added to all run actions.

14

connectionTimeout

 

(tick)

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

15

continue

 

(error)

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.

16

cookies

 

(tick)

Name of file to restore and persist cookies across invocations of CLI actions. Can be used to provide Data Center session affinity for actions using REST APIs.

17

copyPattern

 

(tick)

Copy pattern for an artifact definition.

18

database

 

(tick)

Database name is required for SQL actions.

19

dateFormat

 

(tick)

Format string for date in Java SimpleDateFormat, default is client date format.

20

dbPassword

 

(tick)

Database user password. Defaults to password.

21

dbUser

 

(tick)

Database user name. Defaults to user.

22

debug

 

(error)

Requests detail debug output. Optional for all actions.

23

description

 

(tick)

Description for entity.

24

disable

 

(error)

Disable an entity for those entities like plans, stages, jobs, and tasks.

25

driver

 

(tick)

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

26

enable

 

(error)

Enable an entity when updating.

27

encoding

 

(tick)

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

28

expand

 

(tick)

Expanded request information to obtain more detailed data on request.

29

favorite

 

(error)

Subset to favorites. Same as favourite.

30

favourite

 

(error)

Subset to favourites. Same as favorite.

31

field1

 

(tick)

Task or repository specific field or variable name. Value is specified by the value1 parameter.

32

field2

 

(tick)

Task or repository specific field or variable name. Value is specified by the value2 parameter.

33

field3

 

(tick)

Task or repository specific field or variable name. Value is specified by the value3 parameter.

34

field4

 

(tick)

Task or repository specific field or variable name. Value is specified by the value4 parameter.

35

field5

 

(tick)

Task or repository specific field or variable name. Value is specified by the value5 parameter.

36

field6

 

(tick)

Task or repository specific field or variable name. Value is specified by the value6 parameter.

37

fields

 

(tick)

Use to specify task or repository specific fields or variables and their values. A comma separated list of key:value pairs. Single quote the key:value pair if it contains a comma (,) or line breaks.

38

file

f

(tick)

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

39

findReplace

 

(tick)

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

40

findReplaceRegex

 

(tick)

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.

41

help

 

(error)

Prints this help message.

42

host

 

(tick)

Database host server for SQL actions. Not used if url is provided. (default: localhost)

43

id

 

(tick)

Stage or task id.

44

ipRestriction

 

(tick)

Comma separated list of IP addresses to restrict ability to remotely trigger builds.

45

issues

 

(tick)

Comma separated list of JIRA issue keys.

46

job

 

(tick)

Job key. Example: JOB1

47

labels

 

(tick)

Comma or blank separated list of labels.

48

limit

 

(tick)

Maximum number of entries to return. (default: 2147483647)

49

list

 

(tick)

Comma separated list of entries. Single quote values containing a delimiter. Embedded quotes must be doubled.

50

location

 

(tick)

Working directory relative path to a source location for an artifact definition or a destination location for an artifact dependency.

51

manual

 

(error)

Indicate that a stage be run manually.

52

name

 

(tick)

Name of entity, like plan name.

53

number

 

(tick)

Build number. Defaults to latest. (default: 0)

54

outputFormat

 

(tick)

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

55

password

p

(tick)

User password for remote access.

56

plan

 

(tick)

Plan key containing the project key. Preferred way to reference a plan instead of the older build terminology. Example: XXX-DEF

57

port

 

(tick)

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

58

project

 

(tick)

Project key. Example: XXX

59

projectName

 

(tick)

Project name.

60

propertyFile

 

(tick)

Property file with mapping information.

61

quiet

 

(error)

Limit some output messages. Optional for all actions.

62

regex

 

(tick)

Regular expression for including matching content.

63

replace

 

(error)

Replace existing entity.

64

repository

 

(tick)

Name of a repository. In some cases, a comma separated list of repository names.

65

repositoryKey

 

(tick)

Repository key. Example: com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-mercurial:hg

66

request

 

(tick)

URL fragment for a request.

67

requestParameters

 

(tick)

URL request parameters

68

requestType

 

(tick)

Type of a render request like GET or POST (default: GET)

69

requirement

 

(tick)

Plan requirement key, either a custom key or a system capability key like: system.builder.ant.Ant.

70

revision

 

(tick)

Revision id or tag.

71

schedule

 

(tick)

Cron, daily time, or periodic schedule. A cron schedule must be valid cron expresssions and defaults to 0 0 0 ? * *. A daily time is a 24 hour format (HH:mm) value. A periodic schedule is a numeric value in seconds and defaults to 180.

72

searchLabels

 

(tick)

Comma or blank separated list of labels used for search.

73

server

s

(tick)

Server URL. Normally the base URL of the server and the same as how the server is accessed from a browser.

74

service

 

(tick)

Service address extension. (default: /rest/api)

75

shared

 

(error)

For an artifact definition, makes the artifact available for other builds.

76

simulate

 

(error)

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

77

special

 

(tick)

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

78

sql

 

(tick)

SQL select statement used to generate a run script.

79

stage

 

(tick)

Stage name.

80

taskKey

 

(tick)

Task key. Example: com.atlassian.bamboo.plugins.scripttask:task.builder.script

81

timeout

 

(tick)

Wait timeout in seconds. Use -1 to wait forever. (default: -1)

82

toPlan

 

(tick)

Plan key to be created. Example: XXX-DEF

83

toProject

 

(tick)

Project key to clone to.

84

type

 

(tick)

Requirement match type. Values: exist, equal, match. Also, content type for renderRequest. (default: exist)

85

url

 

(tick)

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

86

user

u

(tick)

User name for remote access. (default: automation)

87

value

 

(tick)

Requirement match value.

88

value1

 

(tick)

Value corresponding to the field1 parameter name.

89

value2

 

(tick)

Value corresponding to the field2 parameter name.

90

value3

 

(tick)

Value corresponding to the field3 parameter name.

91

value4

 

(tick)

Value corresponding to the field4 parameter name.

92

value5

 

(tick)

Value corresponding to the field5 parameter name.

93

value6

 

(tick)

Value corresponding to the field6 parameter name.

94

verbose

v

(error)

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

95

wait

 

(error)

Wait for action to complete.

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.