You need to create an API token in your user account to authenticate.

On Thu, May 21, 2020 at 6:20 AM Jayalakshmi Nair
<jayalakshmi.nair...@gmail.com> wrote:
>
> Hello all,
>
> I was looking for a lightweight method to get the build details. (As we have 
> a lot of builds and noticed that getBuilds method consumes a lot of time).
> I figured out that there is no other approach from the Jenkins methods to get 
> the builds.
>
> Now I am trying to get the build details from 
> $JENKINS_HOME/jobs/$NAME_OF_JOB/api/xml. However ,while trying to read the 
> xml using the url, this throws me a 403 or 401. This can be resolved by 
> authenticating.
>
> Can anyone assist me on how I can obtain the username and password of the 
> currently logged in user in java? Or is there a way to access the job link 
> without authentication?
> Or is there any api in java which helps me read the above URL?
>
> Thanks in advance.
>
> -Jayalakshmi
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/e4cb9ec0-5bb8-4014-bb3a-428aab6d7ccc%40googlegroups.com.



-- 
Matt Sicker
Senior Software Engineer, CloudBees

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAEot4oxBUbsT1k7PW%3DNvWPFrCdJ5-Qh1afQ9%2Bj-HXE9qorSNUA%40mail.gmail.com.

Reply via email to