I’m trying to create/update a Jenkins job via the REST API. I can successfully retrieve a crumb, so I know that my username/password combination works.
Whenever I try to POST a job, using a Basic Authentication with the “username:password” base64 encoded, I get a 403.
Whenever I try to POST a job, using a Basic Authentication with the “username:apitoken” base64 encoded, I get a 500. The apitoken has been handmade just for this test.
I have tried to use the example posted in Cloudbees Support (https://support.cloudbees.com/hc/en-us/articles/226835367-How-to-update-job-config-files-using-the-REST-API-and-Java-)
The project source files are located here: https://github.com/Topdanmark/jenkins-job-rest-api
The username, password, and server have been redacted for obvious reasons.
Any pointers are appreciated. A quick heads up. The project must be able to run on Java8 on Windows, due to legacy requirements.
Regards,
Jon Brohauge
Whenever I try to POST a job, using a Basic Authentication with the “username:password” base64 encoded, I get a 403.
Whenever I try to POST a job, using a Basic Authentication with the “username:apitoken” base64 encoded, I get a 500. The apitoken has been handmade just for this test.