if you want to manage your jobs using the API are some tools that make that 
work Jenkin Job Builder 
<https://jenkins-job-builder.readthedocs.io/en/latest/>, also you can 
manage your Jobs and configuration using Jenkins configuration as Code 
<https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/README.md>
 
and JobDSL plugin <https://plugins.jenkins.io/job-dsl/>

El lunes, 4 de abril de 2022 a las 11:13:34 UTC+2, jonbr...@gmail.com 
escribió:

> Hi everyone,
>
>  
>
> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/afe9afac-37ee-41dc-b854-11d3cc4e31f1n%40googlegroups.com.

Reply via email to