Project

General

Profile

Actions

Defect #10803

closed

Unable to Update (PUT) Versions Through API

Added by Cory Riddell over 12 years ago. Updated over 12 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

The api docs (http://www.redmine.org/projects/redmine/wiki/Rest_Versions#PUT) say you should be able to update existing versions with PUT but when I try it, I get an error 405 that says "Only get and post requests are allowed.".

Actions #1

Updated by Jean-Philippe Lang over 12 years ago

  • Resolution set to Cant reproduce

Which URL are you using to make your PUT request?

Actions #2

Updated by Jean-Philippe Lang over 12 years ago

  • Description updated (diff)

And please post the application log instead of the response.

Actions #3

Updated by Cory Riddell over 12 years ago

The URL was 'http://localhost/redmine/projects/1/versions.json'
and the log contains this:

Processing ApplicationController#index (for 127.0.0.1 at 2012-04-30 10:41:24) [PUT]
  Parameters: {"version"=>{"status"=>"closed", "name"=>"1016"}}

ActionController::MethodNotAllowed (Only get and post requests are allowed.):
  config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering rescues/layout (method_not_allowed)
Actions #4

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from New to Closed
  • Resolution changed from Cant reproduce to Invalid

To update a version, the PUT request is to be made to /versions/:id.:format (eg. /versions/2.xml).
Please, read Rest_Versions.

Actions

Also available in: Atom PDF