Project

General

Profile

REST API error

Added by Dmit nitkin over 12 years ago

Hi.
I'm a developer of plugin for SVN and Visual Studio, and not familiar with Ruby.
The problem is:
On some installations of Redmine admin accepts through API the list of projects and gets 406 error. In this case there are messages in log

Processing ApplicationController#index (for 192.168.0.43 at 2011-09-23 17:31:05) [GET]

Parameters: {"limit"=>"100"}

ActionController::RoutingError (No route matches "/login/projects.json" with {:method=>:get}):

config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/404.html (404 Not Found)

Processing ProjectsController#index to json (for 192.168.0.43 at 2011-09-23 17:31:11) [GET]

Parameters: {"format"=>"json", "action"=>"index", "controller"=>"projects", "limit"=>"100"}
Rendering projects/index
Completed in 8ms (View: 3, DB: 0) | 200 OK [http://server/redmine/projects.json?limit=100]

On my Bitnamy installation there are another messages in log

Processing ProjectsController#index to json (for 10.10.10.10 at 2011-09-26 11:17:43) [GET]

Parameters: {"format"=>"json", "action"=>"index", "controller"=>"projects", "limit"=>"100"}
Filter chain halted as [:check_if_login_required] rendered_or_redirected.
Completed in 10ms (View: 0, DB: 0) | 401 Unauthorized [http://server/redmine/projects.json?limit=100]

Processing ProjectsController#index to json (for 10.10.10.10 at 2011-09-26 11:17:43) [GET]

Parameters: {"format"=>"json", "action"=>"index", "controller"=>"projects", "limit"=>"100"}
Rendering projects/index
Completed in 80ms (View: 10, DB: 20) | 200 OK [http://server/redmine/projects.json?limit=100]

Last Redmine 1.2.1 version is used in both cases