API to Trigger a new Build by Project (preview) fails

api

#1

I’ve enabled the preview feature in my projects settings. I’ve created a new api key in the project, with ‘all’ permissions.

When trying to trigger the project via:
curl -X POST --header “Content-Type: application/json” -d ‘{“branch”:“develop”}’ “https://circleci.com/api/v1.1/project/github///build?&circle-token=xxxxxxxxxxxxx”

… it fails with {“message”:“An internal server error occurred.”}

I just received an email saying this is possible.
And please stop closing tickets when issues are not solved.


API to Trigger a new Build by Project (preview) is broken
#2

Mostly, no-one is doing that - it is an automatic feature of the board, presumably to prevent necroposting. If you see an old post that is closed, you can create a new post and link to the old one.

The /// looks suspect to me. Are there meant to be two null/empty values in here?


#3

More like this:
curl -X POST https://circleci.com/api/v1.1/project/github/username/projectname/build?branch=develop&circle-token=xxxxxxxxxxxxx


#4

@mt-micky - one thing to check first is whether you turn on the “build processing” feature under “Advanced Settings” on your project settings page – that’s required for the new build triggering endpoint. If that’s the issue, we can make the error message better. If that’s not the issue, let us know.


#5

Yes, it’s turn on. That’s how I’m testing the feature but still getting “An internal server error occurred.”


#6

Hey! Did you have any luck with this? I’m actually getting the same error.