Project

General

Profile

Rest TimeEntries » History » Version 1

Jean-Philippe Lang, 2011-01-02 13:01

1 1 Jean-Philippe Lang
h1. Time Entries
2
3
h2. Listing time entries
4
5
  GET /time_entries.xml
6
7
Returns time entries.
8
9
h2. Showing a time entry
10
11
  GET /time_entries/[id].xml
12
13
Returns the time entry of given id.
14
15
h2. Creating a time entry
16
17
  POST /time_entries.xml
18
19
Creates a time entry.
20
21
+Parameters+:
22
23
* @time_entry@ (required): a hash of the time entry attributes, including:
24
25
  * @issue_id@ or @project_id@ (only one is required): the issue id or project id to log time on
26
  * @spent_on@: the date the time was spent (default to the current date)
27
  * @hours@ (required): the number of spent hours
28
  * @activity_id@: the id of the time activity. This parameter is required unless a default activity is defined in Redmine.
29
  * @comments@: short description for the entry (255 characters max)
30
31
+Response+:
32
33
  * @201 Created@: time entry was created
34
  * @422 Unprocessable Entity@: time entry was not created due to validation failures (response body contains the error messages)
35
36
h2. Updating a time entry
37
38
  PUT /time_entries/[id].xml
39
40
Updates the time entry of given id.
41
42
+Parameters+:
43
44
* @time_entry@ (required): a hash of the time entry attributes (same as above)
45
46
+Response+:
47
48
  * @200 OK@: time entry was updated
49
  * @422 Unprocessable Entity@: time entry was not updated due to validation failures (response body contains the error messages)
50
51
h2. Deleting a time entry
52
53
  DELETE /time_entries/[id].xml
54
55
Deletes the time entry of given id.