Defect #9375
closedCreating new time entries using REST API returns 404
0%
Description
I am using redmine 1.2.1.stable with mysql and am having an issue using the REST API to create new time entries.
I am using key authentication and the PHP ActiveResource implementation. Loading Projects, Issues and time entries using the API works without any problems. However, when I try to create a new time entry i get a 404 response.
I execute a POST to https://myapikey@myredminedomain.de/time_entries.xml
with the following data
<?xml version="1.0" encoding="UTF-8"?><time_entrie>
<issue_id>8998</issue_id>
<spent_on>2011-09-01</spent_on>
<hours>0.57333</hours>
<activity_id>9</activity_id>
<comments>Comment text</comments>
</time_entrie>
The server responds with:
HTTP/1.1 404 Not Found Date: Wed, 05 Oct 2011 07:07:35 GMT Server: Mongrel 1.1.5 Status: 404 X-Runtime: 3 Content-Type: application/xml; charset=utf-8 Content-Length: 1 Cache-Control: no-cache Set-Cookie: _redmine_session=BAh7BjoPc2Vzc2lvbl9pZCIlNDUwMmM3MjlkZGM1OGIzZmQzYmNiOWU5MGU1OTE3Y2Y%3D--2f3124386282fbb78a29f4b4ae58020f9ea13c43; path=/; HttpOnly
Calling the URL directly will output
<?xml version="1.0" encoding="UTF-8"?><time_entries type="array" limit="25" total_count="0" offset="0"></time_entries>
And again, fetching a time entry via GET works without problems.
Here you can find the code i used to reproduce the issue (load time entry id 1 works, then creating a new entry fails with 404): time-entry-test.zip
Any help would be greatly appreciated
Files