~~NOTRANS~~ ====== Times ====== ===== GET ===== ==== Get time via ID [From X2 new format] ==== ''/rest/times/time/__5__'' * Get for time ID 5 == Example result == 5 11 0 12 1.5 6 Test ===== POST/PUT ===== ==== Add a new time for social project [From X2 new format] ==== Social projects (Sozialkostenprojekte) are those projects with the flag **is_included_in_time_sheet** active. ''/rest/times/time'' * Add new == Example request body == staff_id=4&date=2012/06/12&project_id=11&work_package_id=12&number=2&time_to=14%3A00&time_from=12%3A00&purpose=Test == Example result == .../rest/times/time/5 === Possible values === ^ Field ^ Description ^ Valid Values ^ German Name ^ ^ staff_id | Staff ID | required,integer | Person | ^ date | Date | required,us_date | Datum | ^ project_id | Project ID | required,integer | Projekt | ^ cost_centre_id | Cost centre ID | integer | Kostenstelle | ^ work_package_id | Work package ID | required,integer | Bereich | ^ number | Number | required,numeric,greater_than[-0.001] | Anzahl der Stunden | ^ factor | Factor | numeric,greater_than[-0.001] | Faktor | ^ time_from | Time from | us_time | Zeit von | ^ time_to | Time to | us_time | Zeit bis | ^ purpose | Purpose | | Leistung | ^ purpose_internal | Purpose internal | | Intern | ===== DELETE ===== ==== Delete a time for social project time via ID ==== ''/rest/times/time/__5__'' * Delete for time ID 5 == Example result == OK ===== GET ===== ==== Get times for a member of staff for today [From X2 new format] ==== ''/rest/times/staff/__4__'' * Get for staff ID 4 == Example result == ==== Get times for a member of staff for a defined date [From X2 new format] ==== ''/rest/times/staff/__4__/__2011/1/1__'' * Get for staff ID 4 * Get for 2011/Jan/01 == Same result as above ==