Project

General

Profile

Redmine REST API - Users - Can't authenticate

Added by Attila Bujáki about 12 years ago

Hi!

I am very new to redmine. I want to use it's REST API to get data that I process in my own application.
It works fine, I can get all the issues or projects, but when I request users.xml containing user data
I get HTTP error code 401. I also tried to get this file in a browser, but I just can't authenticate,
even if I enter my admim account's credentials.

I am using redmine with BitNami. My environment is:

Environment:
Redmine version 2.1.2.stable
Ruby version 1.8.7 (i386-mingw32)
Rails version 3.2.8
Environment production
Database adapter MySQL

In browser:

1: Visit localhost/redmine/users.xml
2: It asks for credentials, so I enter my admin's
3: still asking, again :-(

In my java program:

1: I request for the file via HTTP, but I don't know how to include my credentials
2: I get error code 401

Could you help me what I do wrong? Or maybe could you help me to find the file processing this request?
Maybe I could understand what is the problem if I see the source processing this part, but I am very new
to ruby too, and I just got lost.

I checked the routing file so I know that this request, requesting the users.xml is handled by the users_controller,
but I can't figure out what I do wrong.

Any help would be greatly appreciated!