20.03.06 Tasks

The Task Object

Object PropertyRequiredObject TypeDescriptionMax Character Length
TaskNameYesStringName Of Task200
AccountProjectIdYesIntegerProject Id Of Task10
AccountProjectTaskIdNoIntegerUnique Task Id Of Task10
ParentAccountProjectTaskIdNoIntegerParent Task Id Of Task10
TaskDescriptionNoStringTask Description Of Task4000
AccountTaskTypeIdNoIntegerTask Type Id Of Task10
DurationNoDecimalDuration Of Task10
DurationUnitNoStringDuration Unit Of Task20
DeadlineDateNoDate TimeDeadline Date Of Task19
CompletedPercentNoFloatCompleted Percent Of Task10
CompletedNoBooleanCompleted Of Task1
IsParentTaskNoBooleanParent Task Status Of Task1
IsForAllEmployeesNoBooleanTask is for All Employee Status Of Task1
AccountPriorityIdNoIntegerPriority Id Of Task10
TaskStatusIdNoIntegerStatus Id Of Task10
AccountProjectMilestoneIdNoIntegerMilestone Id Of Task10
IsReOpenNoBooleanReOpen Status Of Task1
EstimatedCostNoFloatEstimated Cost Of Task10
EstimatedTimeSpentNoFloatEstimated Time Spent Of Task10
EstimatedTimeSpentUnitNoStringEstimated Time Spent Unit Of Task20
IsBillableNoBooleanBillable Status Of Task1
IsDisabledNoBooleanDisabled Status Of Task1
AccountBillingRateIdNoIntegerBilling Rate Id Of Task10
IsForAllProjectTaskNoBooleanAll Project Task Status Of Task1
TaskCodeNoStringTask Code Of Task30
AccountProjectTaskTemplateIdNoIntegerProject Task Template Id Of Task10
EstimatedCurrencyIdNoIntegerEstimate Currency Id Of Task10
StartDateNoDate TimeStart Date Of Task19
PredecessorsNoStringPredecessors Of Task50
CustomField1NoStringCustomField 1 Of Task2000
CustomField2NoStringCustomField 2 Of Task2000
CustomField3NoStringCustomField 3 Of Task2000
CustomField4NoStringCustomField 4 Of Task2000
CustomField5NoStringCustomField 5 Of Task2000
CustomField6NoStringCustomField 6 Of Task2000
CustomField7NoStringCustomField 7 Of Task2000
CustomField8NoStringCustomField 8 Of Task2000
CustomField9NoStringCustomField 9 Of Task2000
CustomField10NoStringCustomField 10 Of Task2000
CustomField11NoStringCustomField 11 Of Task2000
CustomField12NoStringCustomField 12 Of Task2000
CustomField13NoStringCustomField 13 Of Task2000
CustomField14NoStringCustomField 14 Of Task2000
CustomField15NoStringCustomField 15 Of Task2000
FixedCostNoFloatFixed Cost Of Task10

List All Tasks

Returns a list of your all Tasks in your UNItekTIME account.
GET /API/Tasks

Example Request

curl "https://demo.unitektime.com/api/Tasks" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
  {
        "AccountProjectId": 00001,
        "TaskName": "gather requirements",
        "TaskDescription": "Sample requirements for project",
        "CompletedPercent": 0,
        "AccountProjectTaskId": 00001,
        "CreatedOn": "2017-12-29T12:39:14.813+00:00",
        "ModifiedOn": "2017-12-29T12:39:14.813+00:00",
        "Duration": 0,
        "DurationUnit": "Hours",
        "DeadlineDate": "2017-12-29T00:00:00+00:00",
        "EstimatedCost": 0,
        "EstimatedTimeSpentUnit": null,
        "EstimatedTimeSpent": 0,
        "TaskCode": "GR",
        "StartDate": "2017-12-29T00:00:00+00:00",
        "CustomField1": null,
        "CustomField2": null,
        "CustomField3": null,
        "CustomField4": null,
        "CustomField5": null,
        "CustomField6": null,
        "CustomField7": null,
        "CustomField8": null,
        "CustomField9": null,
        "CustomField10": null,
        "CustomField11": null,
        "CustomField12": null,
        "CustomField13": null,
        "CustomField14": null,
        "CustomField15": null,
        "Completed": "No",
        "IsParentTask": "No",
        "IsForAllEmployees": "No",
        "IsBillable": "No"    
  }
]

Create a Task

Creates a Task in your UNItekTIME account and returns the Response Message.
POST /API/Tasks
Object PropertyRequiredObject TypeDescriptionMax Character Length
TaskNameYesStringName Of Task200
AccountProjectIdYesIntegerProject Id Of Task10

Example Request

curl "https://demo.unitektime.com/api/Tasks" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'AccountProjectId':00001,'TaskName':'Demo Task'}"

Example Response

[            
    {            
        "id": "00003",            
        "message": "Task Added Successfully"            
    }            
]

Update a Task

Update an Task in your UNItekTIME account and returns the Response Message.
POST /API/Tasks/{Task_ID}

Example Request

curl "https://demo.unitektime.com/api/Tasks/00001" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json" \
      -d "{'TaskDescription':'Sample Description for Task'}"

Example Response

[            
    {            
        "id": "00001",            
        "message": "Task Updated Successfully"            
    }            
]

Delete a Task

Delete a Task. Returns a 200 OK response code if the call succeeded.
DELETE /API/Task/{Task_ID}

Example Request

curl "https://demo.unitektime.com/api/Tasks/00003" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X DELETE \
      -H "Content-Type: application/json"

Example Response

[
  {
    "id": "00003",
    "message": "Task Deleted Successfully"
  }
]

Get Employees Assigned in a Task

Show Employees in a Task. Returns a 200 OK response code if the call succeeded.
GET /API/Tasks/{Task_ID}/Team

Example Request

curl "https://demo.unitektime.com/api/Tasks/2153/Team" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X GET \
      -H "Content-Type: application/json"

Example Response

[
 {
        "AccountProjectTaskEmployeeId": 3731104,
        "AccountProjectId": 323166,
        "AccountProjectTaskId": 2153,
        "AccountEmployeeId": 93166,
        "TaskName": "Demo issue",
        "FirstName": "John",
        "LastName": "Doe"
    }
]

Add Employee in a Task

Adds an Employee in a Task. Returns a 200 OK response code if the call succeeded.
POST /API/Tasks/InsertTaskEmployee/{Task_ID}/{Employee_ID}

Example Request

curl "https://demo.unitektime.com/api/Tasks/InsertTaskEmployee/2153/65415" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X POST \
      -H "Content-Type: application/json"

Example Response

[
  {
     "Id": "2153"
     "Message": "Employee with Id '65415' is Successfully added to Task"
  }
]

Remove Employee from a Task

Removes an Employee in a Task. Returns a 200 OK response code if the call succeeded.
DELETE /API/Tasks/RemoveTaskEmployee/{Task_ID}/{Employee_ID}

Example Request

curl "https://demo.unitektime.com/api/Tasks/RemoveTaskEmployee/2153/65415" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "User-Agent: MyApp (yourname@example.com)" \
      -X DELETE \
      -H "Content-Type: application/json"

Example Response

[
  {
     "Id": "65415"
     "Message": "Employee with Id '65415' is Successfully Removed from Task"
  }
]

List All Tasks in a Project

Returns a list of your all Tasks that have been added under a specific project.
GET /API/Tasks/Projects/{Project Id}

Example Request

curl "https://demo.unitektime.com/api/Tasks/Projects/1" \
      -H "APIKey: {Your API Key}" \
      -H "AuthToken: {Your Authentication Token}" \
      -H "Content-Type: application/json" \
      -H "User-Agent: MyApp (yourname@example.com)"

Example Response

[
  {
        "AccountProjectId": 00001,
        "TaskName": "gather requirements",
        "TaskDescription": "Sample requirements for project",
        "CompletedPercent": 0,
        "AccountProjectTaskId": 00001,
        "CreatedOn": "2017-12-29T12:39:14.813+00:00",
        "ModifiedOn": "2017-12-29T12:39:14.813+00:00",
        "Duration": 0,
        "DurationUnit": "Hours",
        "DeadlineDate": "2017-12-29T00:00:00+00:00",
        "EstimatedCost": 0,
        "EstimatedTimeSpentUnit": null,
        "EstimatedTimeSpent": 0,
        "TaskCode": "GR",
        "StartDate": "2017-12-29T00:00:00+00:00",
        "CustomField1": null,
        "CustomField2": null,
        "CustomField3": null,
        "CustomField4": null,
        "CustomField5": null,
        "CustomField6": null,
        "CustomField7": null,
        "CustomField8": null,
        "CustomField9": null,
        "CustomField10": null,
        "CustomField11": null,
        "CustomField12": null,
        "CustomField13": null,
        "CustomField14": null,
        "CustomField15": null,
        "Completed": "No",
        "IsParentTask": "No",
        "IsForAllEmployees": "No",
        "IsBillable": "No"    
  }
]