Reputation: 183
I'm trying to access the api features for mingle via curl. My end goal is to use the php libraries for curl to do it but right now I'm using curl in the terminal to try to eliminate my errors. So I type into my terminal:
curl -v -u rtservice:minRTgle http://10.10.8.170:8080/api/v2/projects/request_tracker_queue/cards/18.xml
and I get:
* About to connect() to 10.10.8.170 port 8080 * Trying 10.10.8.170... connected * Connected to 10.10.8.170 (10.10.8.170) port 8080 * Server auth using Basic with user 'rtservice' > GET /api/v2/projects/request_tracker_queue/cards/18.xml HTTP/1.1 > Authorization: Basic cnRzZXJ2aWNlOm1pblJUZ2xl > User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 > Host: 10.10.8.170:8080 > Accept: */* > < HTTP/1.1 403 Forbidden < Cache-Control: no-cache < Content-Type: application/xml; charset=utf-8 < Content-Length: 175 < Set-Cookie: last-visited-project=request_tracker_queue; path=/; expires=Thu, 12-Sep-2013 21:34:32 GMT < Set-Cookie: mingle_12_2_2_session_id=0f0bc86a43e0b69bfc6665df68c31046; path=/; HttpOnly < Server: Jetty(6.1.19)
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Either the resource you requested does not exist or you do not have access rights to that resource.</error>
</errors>
* Connection #0 to host 10.10.8.170 left intact * Closing connection #0
I'm not sure what I'm doing wrong. The credentials are correct and if I try to access the url in firefox it returns the xml that I would expect (However it does prompt me asking "Are you sure?"). The weird thing is that if I try to do the samething in chrome it returns the same error as in the terminal. I'm at a loss. I don't understand what could be messed up.
Thanks for your help in advance,
Jordan
Upvotes: 0
Views: 527
Reputation: 183
It turns out that my issue wasn't with curl. It was a configuration issue with Mingle. I needed to turn on basic authentication in Mingle's configuration.
Upvotes: 0