Rest TimeEntries » History » Revision 9
« Previous |
Revision 9/15
(diff)
| Next »
Aleksandar Pavic, 2019-06-06 08:38
removed period_type there is no such parameter... Might be related to some plugin like https://github.com/edavis10/redmine-timesheet-plugin/blob/e0c362447d90a009853e2e1c659dc79d7db01995/app/models/timesheet.rb#L60 , but creates ambiguity..
(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)
Time Entries¶
- Table of contents
- Time Entries
Listing time entries¶
GET /time_entries.xml
Returns time entries.
Parameters:
offset
limit
user_id
project_id
spent_on
- ...
project_id
filter¶
When filtering by project id, you can use either project numeric ID or its string identifier, e.g.
...&project_id=123
...&project_id=my-custom-project
spent_on
filter¶
When filtering by date, you can require a min / max date with a custom syntax:
/time_entries.json?project_id=338&from=2019-01-01&to=2019-01-03&limit=100
Showing a time entry¶
GET /time_entries/[id].xml
Returns the time entry of given id.
Creating a time entry¶
POST /time_entries.xml
Creates a time entry.
Parameters:
time_entry
(required): a hash of the time entry attributes, including:issue_id
orproject_id
(only one is required): the issue id or project id to log time onspent_on
: the date the time was spent (default to the current date)hours
(required): the number of spent hoursactivity_id
: the id of the time activity. This parameter is required unless a default activity is defined in Redmine.comments
: short description for the entry (255 characters max)
Response:
201 Created
: time entry was created422 Unprocessable Entity
: time entry was not created due to validation failures (response body contains the error messages)
Updating a time entry¶
PUT /time_entries/[id].xml
Updates the time entry of given id.
Parameters:
time_entry
(required): a hash of the time entry attributes (same as above)
Response:
200 OK
: time entry was updated422 Unprocessable Entity
: time entry was not updated due to validation failures (response body contains the error messages)
Deleting a time entry¶
DELETE /time_entries/[id].xml
Deletes the time entry of given id.
Updated by Aleksandar Pavic over 5 years ago · 9 revisions