POST api/timeTracking/AddTimeSpentItem
If support multiple time entries or support multiple time entries with category and cost, the method will add a time spent entry, else return an error.
Request Information
URI Parameters
None.
Body Parameters
UpdateTimeSpentItemBinderName | Description | Type | Additional information |
---|---|---|---|
OwnerId | integer |
None. |
|
Date | date |
None. |
|
TimeHourlyRate | decimal number |
None. |
|
CategoryId | integer |
None. |
|
Note | string |
None. |
|
ProjectId | integer |
None. |
|
TaskId | integer |
None. |
|
TimeValue |
If TimeValue.Option eqals 0, TimeValue.Value should be described as the amount of minutes, else TimeValue.Value should use format like '1d2h3m'. |
ParamValueObject |
None. |
Request Formats
application/json, text/json
Sample:
{ "OwnerId": 1, "Date": "2024-12-21 16:47:17", "TimeHourlyRate": 3.1, "CategoryId": 4, "Note": "sample string 5", "ProjectId": 6, "TaskId": 7, "TimeValue": { "Value": "sample string 1", "Option": 2 } }
application/xml, text/xml
Sample:
<UpdateTimeSpentItemBinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Binding"> <ProjectId>6</ProjectId> <TaskId>7</TaskId> <TimeValue> <Option>2</Option> <Value>sample string 1</Value> </TimeValue> <CategoryId>4</CategoryId> <Date>2024-12-21T16:47:17.0439757-08:00</Date> <Note>sample string 5</Note> <OwnerId>1</OwnerId> <TimeHourlyRate>3.1</TimeHourlyRate> </UpdateTimeSpentItemBinder>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
If support multiple time entries or support multiple time entries with category and cost, the method will add a time spent entry, else return an error.
API_Data_TaskRollupTimeInfoName | Description | Type | Additional information |
---|---|---|---|
Success | boolean |
None. |
|
Error | ErrorInfo |
None. |
|
Data | TaskRollupTimeInfo |
None. |
Response Formats
application/json, text/json
Sample:
{ "Success": true, "Error": { "ErrorCode": 1, "ErrorMessage": "sample string 1" }, "Data": { "TimeSpent": { "Value": 1, "DisplayValue": "sample string 2" }, "TimeRemaining": { "Value": 1, "DisplayValue": "sample string 2" }, "TimeTotal": { "Value": 1, "DisplayValue": "sample string 2" } } }
application/xml, text/xml
Sample:
<API_Data_TaskRollupTimeInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common"> <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Entities"> <d2p1:TimeRemaining> <DisplayValue>sample string 2</DisplayValue> <Value>1</Value> </d2p1:TimeRemaining> <d2p1:TimeSpent> <DisplayValue>sample string 2</DisplayValue> <Value>1</Value> </d2p1:TimeSpent> <d2p1:TimeTotal> <DisplayValue>sample string 2</DisplayValue> <Value>1</Value> </d2p1:TimeTotal> </Data> <Error> <ErrorCode>1</ErrorCode> <ErrorMessage>sample string 1</ErrorMessage> </Error> <Success>true</Success> </API_Data_TaskRollupTimeInfo>