Get Started
Portal api methods
Help

POST api/2.0/project/task/{taskid}/time This function requires authentication

Description

Adds the time to the selected task with the time parameters specified in the request

Parameters
Name Description Type Example
taskid
sent in url
Task ID number 1234
note
sent in body
Note string some text
date
sent in body
Date Date and Time 2011-10-1
personId
sent in body
Person that spends time guid 9924256A-739C-462b-AF15-E652A3B1B6EB
hours
sent in body
Hours spent number 1234
projectId
sent in body
Project ID number 1234
Example
POST api/2.0/project/task/1234/time
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "note": "some text",
  "date": "2008-04-10T06-30-00.000Z",
  "personId": "9924256A-739C-462b-AF15-E652A3B1B6EB",
  "hours": 1234.0,
  "projectId": 1234
}
Returns

Created time

Example Response

application/json

{
  "status": 0,
  "response": {
    "canEdit": true,
    "id": 10,
    "date": "2019-08-17T20:39:00.1589001Z",
    "hours": 3.5,
    "note": "Sample note",
    "relatedProject": 123,
    "task": null,
    "relatedTask": 13456,
    "relatedTaskTitle": "Sample task",
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "person": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "paymentStatus": 2,
    "statusChanged": "2019-08-17T20:39:00.1589001Z",
    "canEditPaymentStatus": true,
    "createOn": null
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <canEdit>true</canEdit>
    <id>10</id>
    <date>2019-08-17T20:39:00.1589001Z</date>
    <hours>3.5</hours>
    <note>Sample note</note>
    <relatedProject>123</relatedProject>
    <task />
    <relatedTask>13456</relatedTask>
    <relatedTaskTitle>Sample task</relatedTaskTitle>
    <createdBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createdBy>
    <person>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </person>
    <paymentStatus>2</paymentStatus>
    <statusChanged>2019-08-17T20:39:00.1589001Z</statusChanged>
    <canEditPaymentStatus>true</canEditPaymentStatus>
    <createOn />
  </response>
</result>