Actions
Defect #16992
closedCannot update wiki page via REST API
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
Environment:
Redmine version 2.5.1.stable
Ruby version 2.0.0-p481 (2014-05-08) [x86_64-linux]
Rails version 3.2.17
Environment production
Database adapter Mysql2
I am trying to update the content of a wiki page via REST API but I always get an error message complaining that I am posting no content: "text field can't be blank".
I am using the following CURL invocation:
curl -X PUT http://MY-API-KEY@redmine.lan/redmine/projects/foo/wiki/bar.xml -d "<?xml version="1.0"?> <wiki_page> <text>Example</text> <comments>Typo</comments> </wiki_page>"
and I get the following error message:
<?xml version="1.0" encoding="UTF-8"?><errors type="array"><error>Text field can't be blank</error></errors>
The production log shows the following:
Processing by WikiController#update as XML
Parameters: {"<?xml version"=>"1.0?>\n<wiki_page>\n <text>Example</text>\n <comments>Typo</comments>\n</wiki_page>", "project_id"=>"foo", "id"=>"bar"}
Current user: user1 (id=23)
Rendered common/error_messages.api.rsb (0.2ms)
The error is the same, regardless of the fact that wiki page already exists or not.
Actions