Add a REST api on top of work time

#15 Merged at df1653a
Repository
eivindt
Branch
rest-api
Repository
tkusukawa
Branch
default
Author
  1. Eivind Tagseth
Reviewers
Description

This pull request adds a simple REST api for work time.

This exports the relay_total part (i.e. the relayed monthly report) of work time as JSON/XML for use by external programs (I use it to generate an ODT document).

A typical request URI is:

http://localhost/redmine/work_time/relay_total/wktime-test-project.json?day=1&month=9&prj=4&year=2014&key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeef

and the typical response looks like:

{"total_relay":
    {"total_cost":1.0,"member_cost":
        [
            {"user":{"id":11,"firstname":"Eivind","lastname":"Tagseth"},
             "cost":1.0}
        ],
     "issues_cost":
        [
            {"issue":{"id":267,"tracker":{"id":4,"name":"User Story"},"subject":"Test my changes"},"cost":1.0}
        ]
    }
}

[ slighty reformatted for readability ]

Comments (1)