Project

General

Profile

Actions

Defect #15233

closed

500 in POST to /Users.xml

Added by Jens Theisen over 10 years ago. Updated over 10 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

In an attempt to integrate redmine more tightly with my own applications, I'm trying to create users through the API.

I managed to get authenticated and get a list of current users, but on posting to /Users.xml, I get a 500.

I posted the example xml from here: http://www.redmine.org/projects/redmine/wiki/Rest_Users#POST.

This might be a bug, but since I'm getting this on my current install, which is 2.0.1, as well as a fresh install in the bitnami cloud, which is 2.3.3, it's also possible I'm just doing something stupid.

I attached the request and the response.

Also, here's the version info from the two installations I tested with the same result:

Bitnami cloud machine:

Environment:
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
no plugin installed

My production system:

Environment:
Redmine version 2.0.1.stable
Ruby version 1.9.3 (i386-mingw32)
Rails version 3.2.3
Environment production
Database adapter SQLite
Redmine plugins:
no plugin installed


Files

redmineconv.txt (1.46 KB) redmineconv.txt Request and response Jens Theisen, 2013-10-31 13:08
redmine500-productionlog.png (16.7 KB) redmine500-productionlog.png The requested excerpt from production.log Jens Theisen, 2013-11-04 12:43
Actions #1

Updated by Etienne Massip over 10 years ago

Please have a look in production.log file, you should find the error stack trace in it.

Actions #2

Updated by Etienne Massip over 10 years ago

  • Status changed from New to Needs feedback
  • Assignee set to Jens Theisen
Actions #3

Updated by Jens Theisen over 10 years ago

I attached the relevant bit as an image.

Sorry that it's an image, but I just set up a virtual machine for it and that was the simplest way to get at it.

This is again from a 2.3.3:

Environment:
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
no plugin installed

Actions #4

Updated by Jean-Philippe Lang over 10 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid

Have a look at Rest_api.
You have to set the content-type header in your request: Content-Type: application/xml

Actions #5

Updated by Jens Theisen over 10 years ago

It's working now, thank's for your time.

Actions

Also available in: Atom PDF