POST/desk/api/v2/timelogs.json

Create a new timelog.

Body Params

Timelog represents a time entry against a tickets

    • Name
      assignToCurrentUser
      Type
      boolean
      Description
      AssignToCurrentUser is a transient field meant to convert the `UserID` field to the current user id when sending to projects. This is done in cases where the user who created the timelog doesn't have access to the project in tw.
    • Name
      billable
      Type
      boolean
    • Name
      createdAt
      Type
      string
      Description
      CreatedAt is a read-only date marking the creation time.
    • Name
      createdBy
      Type
      object
    • Name
      date
      Type
      string
    • Name
      deletedAt
      Type
      string
      Description
      DeletedAt is a read-only date marking the time of deletion. Is only returned when the object is marked as deleted.
    • Name
      deletedBy
      Type
      object
    • Name
      description
      Type
      string
    • Name
      filter_args
      Type
      object
      Description
      RequestCommons allows specifying paging and sorting options. All API endpoints should embed the RequestOrder for consistency.
    • Name
      id
      Type
      integer
    • Name
      postToProject_id
      Type
      integer
      Description
      PostToProjectID specifies that Desk should post a projects time entry for this entry. It can only be set if projectsTimelogs_id is null
    • Name
      projectsTimelogs_id
      Type
      integer
    • Name
      seconds
      Type
      integer
    • Name
      state
      Type
      string
      Description
      State is the status of the object. Typically this will be either active or deleted. When deleted the `deletedAt` and `deletedBy` relationship will be returned.
    • Name
      ticket
      Type
      object
    • Name
      tickets_id
      Type
      integer
    • Name
      timelogs_id
      Type
      integer
    • Name
      timezoneOffset
      Type
      integer
    • Name
      updatedAt
      Type
      string
      Description
      UpdatedAt is a read-only date marking the last updated time. This field is not updated when the object is deleted.
    • Name
      updatedBy
      Type
      object
    • Name
      user
      Type
      object
    • Name
      users_id
      Type
      integer

    Responses

    • Code
      201
      Type
      object
      Schema
      Description
      201 Created
      TimelogAPIBody represents the request/response on timelogs get/create/patch
    • Code
      400
      Type
      object
      Schema
      Description
      400 Bad Request
      Validator hold the validation errors. Typically you shouldn't create this directly but use the New() function.

    Examples

    201 Created

    TimelogAPIBody
    {  "included": {    "tickets": [      {        "activities": [          {            "delete": true,            "id": 0,            "meta": {              "additionalProp": "Unknown Type: any"            },            "type": 0          }        ],        "agent": {          "delete": true,          "id": 0,          "meta": {