Reputation: 91
Looks like there is a typo in Jenkins Confluence page while calling Jenkins url passing parameters as JSON payload.. https://wiki.jenkins.io/display/JENKINS/Remote+access+API
Upvotes: 0
Views: 203
Reputation: 91
Tried with url suffix as build instead of buildWithParameters and it is working..
curl -X POST -u "user:token/password" "http://myjenkins/path/to/my/job/build --data-urlencode json='{"parameter": [{"name":"GERRIT_REFNAME", "value":"feature/retry"},{"name":"goal", "value":"package"}]}'
Upvotes: 1