Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does the Bamboo REST API allow me to update the Change Detection options

Terry Ninnis November 21, 2018

When I set the Include/Exclude files dropdown to "Include only changes that matches to the following pattern", I want to update the associated File Pattern.

I want to update the Change Detection options from the Bamboo REST Api if possible.

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 23, 2018

Hi Terry,

I suggest you using Bamboo Java repository specs. This is how you can create a plan with this feature: Tutorial: Bamboo Java Specs stored in Bitbucket Server - Atlassian Documentation

Once you have a plan in this format you should be able to change the file pattern by performing commits into the plan configuration repository. As soon as Bamboo detects the change in the plan configuration, the file pattern will be updated.

In case you want to understand more about Bamboo specs, please check this page: Bamboo Specs - Atlassian Documentation.

At the moment of this answer, Bamboo does not have a REST api endpoint to update this configuration.

Terry Ninnis December 4, 2018

I am using Java Specs.

The plan I am using uses a Linked Repo called TRYMEsecond.


That Linked Repo has the required pattern in it (i.e. ^(Second).* ) but I cannot see the value of the file pattern in the java spec:

public Plan plan() {
        final Plan plan = new Plan(new Project()
                .oid(new BambooOid("t3bp047ej285"))
                .key(new BambooKey("TRY"))
            new BambooKey("SEC"))
            .oid(new BambooOid("t31zsiu6pd1i"))
            .pluginConfigurations(new ConcurrentBuilds()
            .stages(new Stage("Default Stage")
                    .jobs(new Job("Default Job",
                            new BambooKey("JOB1"))
                            .tasks(new VcsCheckoutTask()
                                    .description("Checkout Default Repository")
                                    .checkoutItems(new CheckoutItem().defaultRepository()))
                            .requirements(new Requirement("system.builder.command.Cygwinbatch"))))
            .triggers(new BitbucketServerTrigger())
            .planBranchManagement(new PlanBranchManagement()
                    .delete(new BranchCleanup()
        return plan;

Terry Ninnis December 5, 2018

On further examination I have found the the change detection code is exported to the "View plan as Java Specs" screen IF the Repository is a Plan Repository but NOT a Linked Repository.

Strangely, the Change Detection settings are honoured as part of the Linked Repository.

Atlassian has warned that the Plan Repositories are being deprecated soon and Bamboo will always default to a Linked Repository.

Is that feature available in any version (we are on 6.4.1)?

Will the ChangeDetection continue to work?

We used Linked Repositories because every solution had its own repo so any change triggered a build.

Now we are using mon-repos, we need specific paths to rigeer the Build Plan.

To summarise:

Plan using Linked Repository has this:


Plan using Plan Repository has this:

 .planRepositories(new BitbucketServerRepository()
        .oid(new BambooOid("***"))
        .repositoryViewer(new BitbucketServerRepositoryViewer())
        .server(new ApplicationLink()
        .changeDetection(new VcsChangeDetection()

And we cannot do this:


    .changeDetection(new VcsChangeDetection()

It will be important for us to know where we are on this

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 6, 2018

Hi Terry,

You are correct, you need plan repositories for this.

At the moment of this message, we don't have plans to remove plan repositories. On recent Bamboo versions we have created mechanisms to encourage users to configure and convert plan repositories to linked ones. We understand that using linked repositories simplifies the server configuration, reduces the amount and complexity of DB data and also helps on updating repository details in just one place.

Is that feature available in any version (we are on 6.4.1)?

You should be able to use this plan repositories and update them through specs from your version to the latest version of Bamboo.

Will the ChangeDetection continue to work?

It works for newer version and AFAIK it will keep that way.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events