Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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.

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;

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

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
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

149 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you