Project

General

Profile

Actions

Defect #7850

closed

Possible broken JSON REST API

Added by Artem Konoplin over 13 years ago. Updated over 4 years ago.

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

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

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

development.xml.log (11.3 KB) development.xml.log Artem Konoplin, 2011-03-15 05:42
development.json.log (6.17 KB) development.json.log Artem Konoplin, 2011-03-15 05:42
Actions #1

Updated by Jean-Philippe Lang over 13 years ago

You need to provide the error stack trace for your Redmine log.

Actions #2

Updated by Jean-Philippe Lang over 13 years ago

No error with current trunk or 1.1-stable.

Actions #3

Updated by Artem Konoplin over 13 years ago

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).

Actions #4

Updated by Daniel Gruen over 13 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

Actions #5

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.

Actions #6

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.

Actions #7

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.

Actions #8

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Closed
  • Resolution set to Cant reproduce
Actions

Also available in: Atom PDF