Jenkins setup: Unknown (working on a client installation)
I am attempting to trigger a build job from Power Automate over the remote access REST API, the build will take user input into the job which I need to pass to the build job over REST API.
Does anyone have any examples of how this is done?
The following curl command works and passes the parameters into the build job, but what format do I need to put this into to be accepted as part of a REST payload?
curl -k -X POST -u “accountname” https://[instance URL]/[job/path]/build --form json=‘{“parameter”:[{“name”:“FIELD_NAME”, “value”:“value-to-insert”}]}’
I’ve tried the following in the body of the request, but it returns a 400 error indicating a bad syntax.
{
“parameter”: [
{“name”:“FIELD_NAME”, “value”:“value-to-insert”}]
}
Does anyone know how an array of parameters would be passed as valid JSON?
Any advice or guidance would be greatly appreciated.