Closed timja closed 6 years ago
The wiki page (it's a wiki, so anyone can edit it) explains how to pretend to be a web browser, so the solution (if you want to call it that) would be to figure out how the submitted request differs from a browser's, and change accordingly.
There is currently no supported way to specify a file parameter through the remote API. The real API is documented inside Jenkins when you click "Rest API" on any job-related URL, and it's quite different from what's documented on the wiki.
I'm following this page to submit a job using the remote API: https://wiki.jenkins.io/display/JENKINS/Remote+access+API#RemoteaccessAPI-Submittingjobs
My command:
In the job I have the krb5.keytab, as well as REPO and BRANCH parameters defined.
When I execute above command, I get 500 error with this stacktrace:
When I remove the {"name":"krb5.keytab", "value":"file0"} part from the JSON string, job is trigered, but obviously it has no idea about the submitted file.
Originally reported by goldmann, imported from: NullPointerException when using remote api to trigger a job with file parameter