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