Project

General

Profile

Rest TimeEntries » History » Version 5

Konstantin Ladutenko, 2015-12-30 13:04

1 5 Konstantin Ladutenko
(note: for some versions of Redmine you can need some other extension of path /time_entries.xml, e.g. 2.5 works with *.json http://www.redmine.org/boards/2/topics/48933?r=48934#message-48934 , sometimes in plugins it comes simply without any extension)
2
3 1 Jean-Philippe Lang
h1. Time Entries
4
5 4 yuya ito
{{>toc}}
6
7 1 Jean-Philippe Lang
h2. Listing time entries
8
9
  GET /time_entries.xml
10
11
Returns time entries.
12
13
h2. Showing a time entry
14
15
  GET /time_entries/[id].xml
16
17
Returns the time entry of given id.
18
19
h2. Creating a time entry
20
21
  POST /time_entries.xml
22
23
Creates a time entry.
24
25
+Parameters+:
26
27
* @time_entry@ (required): a hash of the time entry attributes, including:
28
29
  * @issue_id@ or @project_id@ (only one is required): the issue id or project id to log time on
30
  * @spent_on@: the date the time was spent (default to the current date)
31
  * @hours@ (required): the number of spent hours
32
  * @activity_id@: the id of the time activity. This parameter is required unless a default activity is defined in Redmine.
33
  * @comments@: short description for the entry (255 characters max)
34
35
+Response+:
36
37
  * @201 Created@: time entry was created
38
  * @422 Unprocessable Entity@: time entry was not created due to validation failures (response body contains the error messages)
39
40
h2. Updating a time entry
41
42
  PUT /time_entries/[id].xml
43
44
Updates the time entry of given id.
45
46
+Parameters+:
47
48
* @time_entry@ (required): a hash of the time entry attributes (same as above)
49
50
+Response+:
51
52
  * @200 OK@: time entry was updated
53
  * @422 Unprocessable Entity@: time entry was not updated due to validation failures (response body contains the error messages)
54
55
h2. Deleting a time entry
56
57
  DELETE /time_entries/[id].xml
58
59
Deletes the time entry of given id.