Question: I currently have this:

```
multibranchPipelineJob("myjob") {
  branchSources {
    branchSource {
      source {
        bitbucket {
          credentialsId('bitbucket-login-user-pass')
          repoOwner('myteam')
          repository('myrepo')
          autoRegisterHook(true)
        }
      }
    }
  }
}

```

But I also need to add the following settings:
[![enter image description here](https://i.stack.imgur.com/y4pEO.png)](https://i.stack.imgur.com/y4pEO.png)

How do I add these settings in the config? Are they "traits" where do I go to see what traits I have available?

Answer: 
You can have a look at the jobDSL-API-Viewer of your jenkins-instance. This will show you all available jodDSL functions for your instance (jobDSL for installed plugins):

<https://your.jenkins.url/plugin/job-dsl/api-viewer/index.html>
```
  multibranchPipelineJob('example'){
    branchSources{
      branchSource{
        source{
          bitbucket{
            repoOwner(project)
            repository(name)
            credentialsId('git_user')
            traits {
              bitbucketBranchDiscovery{
                strategyId(1)
              }
            }            
          }
        }
      }
    }

```

Where traits are defined in the [DSL documentation](https://aesvl01.ddns.nl-htc01.nxp.com/jenkins/plugin/job-dsl/api-viewer/index.html#method/javaposse.jobdsl.dsl.DslFactory.multibranchPipelineJob) and the strategyId correct value I found in the [bitbucket plugin source code](https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BranchDiscoveryTrait.java#L190).

Must be easy to discover the rest of the options from here.