Request build error: "Branches have been disabled for this pipeline"

I’m trying to use the REST API, to trigger a build, but am getting the following error:

> curl -H "Authorization: Bearer $TOKEN" "https://api.buildkite.com/v2/organizations/clima/pipelines/actiontest/builds"   -X "POST"   -F "commit=HEAD"   -F "branch=master"   -F "message=First build :rocket:"

{
  "message": "Branches have been disabled for this pipeline"
}

I’ve literally copied the example curl script, and don’t have any branch filters on. How can I get this to work?

1 Like

Hi @simonbyrne,

It looks like you’ve turned off all the build triggers, which currently for backwards-compatibility disqualifies the build from running via the API unless you turn on the ignore_pipeline_branch_filters option when calling the API.

This should do the trick:

curl -H "Authorization: Bearer $TOKEN" "https://api.buildkite.com/v2/organizations/clima/pipelines/actiontest/builds"   -X "POST"   -F "commit=HEAD"   -F "branch=master"   -F "message=First build :rocket:" -F "ignore_pipeline_branch_filters=true"

It’s definitely a quirk we ought to address in the future, but I hope that helps!

1 Like

Hi! I also ran into this issue. I was curious if there are any updates on whether API will be enabled for pipelines without triggers any time soon?

1 Like

Hello, @dossett! Welcome to the community! Can you please send the link to your build in question to the support email address?

Best!

1 Like

Thank you @karen.sawrey. This turned out to be an unrelated problem, so I deleted my post.

1 Like