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?

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!