►  Read LogHours

curl –H  'X-api_key: {value}'  http://companyid.seasoo.net/api/LogHours/105

-> Return one JSON object of LogHours.

►  Query LogHours

curl –H  'X-api_key: {value}'  http://companyid.seasoo.net/api/LogHours?projectId==15

-> Return array of JSON object of LogHours, which has projectid = 15.

projectId is filter-parameter. Following filter-parameters are supported:

Parameter

Type

Description

projectId

Long

Id of project, which this loghours is assigned to.

taskId

Long

Id of task, which this loghours is assigned to.

userId

Long

Id of user, which this LogHours belongs to.

hours

Double

How many hours? E.g. 6.5 hours

note

String

 

isInvoiced

Boolean

1 for true and 0 for false

year

Integer

e.g. 2011

month

Integer

1-12 for Jan-Dec

date

Integer

1-31 in month

►  Insert LogHours

POST/PUT   http://companyid.seasoo.net/api/LogHours

with api_key and following request body:

{"projectId":12,

  "taskId":35,

  "userId":101,

  "hours":6.5,

  "year":2011,

  "month":1,

  "date":21

}

-> Response has http status code = 201 if successfully. Otherwise it returns status code 500.

►  Update LogHours

Like insert loghours, only URL is different:

POST/PUT http://companyid.seasoo.net/api/LogHours/{id}

with request body is JSON content of loghours.

►  Delete LogHours

DELETE http://companyid.seasoo.net/api/LogHours/{id}

-> Response has status code = 204 in case of success and 404 in case of not success.