[Iplant-api-dev] Foundation API and urllib2 in Python

Darren Boss dboss at email.arizona.edu
Tue Jul 2 08:38:51 MST 2013


I realize this was done on purpose since certain api calls return
different data when not authenticated just like GET and POST calls to
the same url behave differently. I have working python code to set the
authorization header:

https://gist.github.com/netscruff/5886593

On Thu, Jun 27, 2013 at 4:48 PM, Darren Boss <dboss at email.arizona.edu> wrote:
> I've been trying to use the foundation API via Python and I think I've
> found an issue with /auth-v1/ requests. The urllib2 library in Python
> won't authenticate unless the http response contains HTTP code 401
> Unauthorized and a key "WWW-Authenticate". The key is missing so any
> requests to /auth-v1/ fail. I did a test with /io-v1/ and it does
> include WWW-Authenticate and authenticates correctly. I guess the only
> thing I wouldn't be able to do is get a token for the username but I
> thought I would raise the issue to see if it was just an oversight in
> the API development or if this was done on purpose.


More information about the Iplant-api-dev mailing list