Project

General

Profile

Actions

Defect #11443

closed

POST /time_entries.xml lead to 404 error

Added by Anonymous over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I have create an "a.xml" with :

<time_entry>
    <issue_id>3</issue_id> 
    <hours>1.0</hours> 
</time_entry>

The issue id 3 is the issue I want to add time with REST API

Here my request :

curl -v -H 'X-Redmine-API-Key: MYAPIKEY' -X POST -d '@a.xml' http://MYSERVER/time_entries.xml

The result is :

* About to connect() to MYSERVER port 80 (#0)
*   Trying 88.190.234.245... connected
* Connected to MYSERVER (MYIPSERVER) port 80 (#0)
> POST /time_entries.xml HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: MYSERVER
> Accept: */*
> X-Redmine-API-Key: MYAPIKEY
> Content-Length: 178
> Content-Type: application/x-www-form-urlencoded
> 
< HTTP/1.1 404 Not Found
< Content-Type: application/xml; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Status: 404
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.13
< X-UA-Compatible: IE=Edge,chrome=1
< Cache-Control: no-cache
< Set-Cookie: _redmine_session=MYSESSION; path=/; HttpOnly
< Set-Cookie: autologin=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT
< X-Request-Id: 8b3793562127ef727ffe79ebb431fd3b
< X-Runtime: 0.007519
< Date: Thu, 19 Jul 2012 00:30:20 GMT
< X-Rack-Cache: invalidate, pass
< Server: nginx/1.2.1 + Phusion Passenger 3.0.13 (mod_rails/mod_rack)
< 
* Connection #0 to host MYSERVER left intact
* Closing connection #0

I use Redmine tags 2.0.3, on nginx 1.2.1 with passenger 3.0.13 with ruby 1.9.3p194 and rails 3.2.6.

The REST API is activated and I use my REST API to communicate.

I want to create a perl module that can communicate with Redmine API but first I need to understand how to communicate. The API doc is not quite obvious on the subject.

Could you tell me what I doing wrong ?

Actions

Also available in: Atom PDF