How to build a job using the REST API and cURL? Bee Bot July 13, 2022 11:24 Updated The content of this article has moved to the new documentation site. Related articles How to create a job using the REST API and cURL? Get Build Number with REST API How to build a job using the REST API and Java? Navigation in Jenkins fails with 'No valid crumb was included in request' errors How can I purge/clean the build queue? Comments 8 comments Sort by Date Votes Gus Reiber April 22, 2016 20:50 Very helpful. Thx. 0 Miruna Popescu September 01, 2017 13:18 Hi, Is there any way to remotely build a job using the REST API and to add a custom header in the request? Before the build starts to verify this header and to continue or fail the build according to the value of the header? Thanks 1 Denys Digtiar September 18, 2017 07:10 Hi Miruna, What are you trying to achieve by this? Build Parameter support are explained. The endpoint requires authentication and, if enabled, the CSRF token. Therefore, I am not sure what other problem you are trying to solve. 0 Self Learning February 04, 2018 17:28 Hi, this works fine when we use plain (Without @, _, .) username. When use email id as username, it is not working any suggestions? 0 Denys Digtiar February 06, 2018 06:03 You can pass the authentication parameter using the curl's `--user` argument instead of embedding it into the URL, e.g. `--user developer:apiToken` or `--user developer` to get a password prompt see curl documentation for more details. 1 Nagesh Vishtamsetty April 10, 2018 07:14 How can I trigger a release build of a project, using cURL approach? 0 Alberto Martín November 13, 2018 00:43 Edited I'm trying to achieve the same as Miruna. The thing is that, I need to trigger a build using the remote access API but, before starting the build, I need to verify that one of the parameters is the needed one and its value matches what I need. If not, I don't want to trigger the build. Is there a way to achieve this? Can I achieve this somehow configuring and/or defining parameters? 0 Tomas Bjerre November 20, 2018 16:50 The Generic Webhook Trigger Plugin can parse any JSON and contribute variables from it to the build. 0 Please sign in to leave a comment.