Defect #7850
closedPossible broken JSON REST API
0%
Description
When i try to create a project using XML all is gone right.
For ex.: XML post to /projects.xml:
<project name="test123" identifier="test123"/>
Answer:
RC: 201 Message: Created
but when i try to make same thing in JSON format - error is occurred.
Ex.: JSON post to /projects.json:
{"project": {"name": "test123", "identifier": "test123"}}
Answer:
RC: 500 Message: Internal Server Error
Files
Updated by Jean-Philippe Lang almost 14 years ago
You need to provide the error stack trace for your Redmine log.
Updated by Jean-Philippe Lang almost 14 years ago
No error with current trunk or 1.1-stable.
Updated by Artem Konoplin almost 14 years ago
- File development.xml.log development.xml.log added
- File development.json.log development.json.log added
Check again on latest 1.1.2 version. Return code is changed to 422.
RC: 422 Message: null
In attached files development log both from xml (working) and json (non-working).
Updated by Daniel Gruen almost 14 years ago
I have similar problems both with redmine-1.1.1 and redmine-1.1.2.
wget my.server.url/projects.xml
works and downloads list of projects correctly
wget my.server.url/projects.json
causes a HTTP/406 error
Updated by Daniel Gruen over 13 years ago
Let me specify this a little more: GETting projects.json causes a HTTP/406 error both with and without API access key. GETting issues.json works both with and without API access key. Either issues.xml or projects.xml work fine. users/current.json causes a HTTP/404 error. This is on a fresh upgrade of redmine-1.1.2 with local gems
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
fastthread (1.0.7)
i18n (0.4.2)
mysql (2.8.1)
passenger (2.2.14)
rack (1.0.1)
rails (2.3.8)
rake (0.8.7)
running on Apache/2.2.9 (Debian) Phusion_Passenger/2.2.14 PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g.
Updated by Jean-Philippe Lang over 13 years ago
I've just re-checked with current 1.1-stable. GET requests /projects.json or /users/current.json work as expected.
Updated by Daniel Gruen over 13 years ago
Also works for me on a fresh install -- have still no idea what's wrong with the old updated install, though.
Updated by Go MAEDA over 4 years ago
- Status changed from New to Closed
- Resolution set to Cant reproduce