Project

General

Profile

Actions

Defect #28001

closed

API query custom_fields: authorization fails

Added by Wolfgang Ocker over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

Querying the custom_fields using the API:

wget -O - --header='Accept: application/json' --header='X-Redmine-API-Key: mykey' "http://server:3000/custom_fields.json"                                        

fails with "401 Unauthorized Username/Password - Authentication Failed."

Log:

Started GET "/custom_fields.json" for 10.144.178.63 at 2018-01-16 15:57:06 +0000
Processing by CustomFieldsController#index as JSON
  Current user: anonymous
Filter chain halted as :require_admin rendered or redirected
Completed 401 Unauthorized in 6ms (ActiveRecord: 1.2ms)

Whereas querying the users with the same credentials succeeds:

wget -O - --header='Accept: application/json' --header='X-Redmine-API-Key: mykey' "http://server:3000/users.json"                                        

Log:

Started GET "/users.json" for 10.144.178.63 at 2018-01-16 15:58:05 +0000
Processing by UsersController#index as JSON
  Current user: weo (id=5)
  Rendered users/index.api.rsb (17.5ms)
Completed 200 OK in 38ms (Views: 17.7ms | ActiveRecord: 4.5ms)
Environment:
  Redmine version                3.4.4.stable
  Ruby version                   2.4.3-p205 (2017-12-14) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.10
  Mercurial                      3.1.2
  Bazaar                         2.7.0
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  a_common_libs                  2.3.3
  redmine_image_clipboard_paste  3.3.0
  redmine_issue_tabs             1.2.3
  sidebar_hide                   0.0.8
Actions

Also available in: Atom PDF