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