FYI, this issue was due to restricted permission for the user. After 
relaxing the permission API call worked as expected.

Thanks!

On Wednesday, March 28, 2018 at 4:55:55 PM UTC-5, Jenkins User wrote:
>
> Hi All,
>
> I'm using Jenkins 2.89.4.
>
> I'm making an API call using 
>
> /usr/bin/curl -X GET -k --cookie `cat cookie.txt` 
> https://JENKINS_URL/job/MYJOBNAME/lastCompletedBuild/api/xml/ --user 
> usr:token
>
>
> But it is resulting in 404 error like below
>
>
> <html>
>
> <head>
>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
>
> <title>Error 404 Not Found</title>
>
> </head>
>
> <body><h2>HTTP ERROR 404</h2>
>
> <p>Problem accessing 
> /jenkins/job/Hadoop-y-branch-2.8-3-EndToEnd/lastCompletedBuild/api/xml/. 
> Reason:
>
> <pre>    Not Found</pre></p><hr><a href="http://eclipse.org/jetty";>Powered 
> by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
>
>
> </body>
>
> </html>
>
>
> I also enabled '*Prevent Cross Site Request Forgery exploits*' and '*Enable 
> proxy compatibility*' in configureSecurity but could not get it to work. 
> Am I missing something obvious?
>
>
> $ curl --version
>
> curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 
> libidn/1.18 libssh2/1.4.2
>
> Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp 
>
> Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 
>
>
> Any help will be appreciated!
>
>
> Thanks!
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fe61bf9c-1425-4c9a-98a1-4460b60c68da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to