POST api/timeTracking/UpdateTimeSpent

If support single tiem entry per task, the method will update task's time spent property only, else return an error.

Request Information

URI Parameters

None.

Body Parameters

UpdateTimeSpentBinder
NameDescriptionTypeAdditional information
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:
{
  "ProjectId": 1,
  "TaskId": 2,
  "TimeValue": {
    "Value": "sample string 1",
    "Option": 2
  }
}

application/xml, text/xml

Sample:
<UpdateTimeSpentBinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Binding">
  <ProjectId>1</ProjectId>
  <TaskId>2</TaskId>
  <TimeValue>
    <Option>2</Option>
    <Value>sample string 1</Value>
  </TimeValue>
</UpdateTimeSpentBinder>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

If support single tiem entry per task, the method will update task's time spent property only, else return an error.

API_Data_TaskRollupTimeInfo
NameDescriptionTypeAdditional 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>