Updated on 2025-09-10 GMT+08:00

Adding Work Item Workloads (V3)

Function

This API is used to add work item workloads.

Calling Method

For details, see Calling APIs.

URI

POST /v3/projects/{project_uuid}/issues/{issue_id}/work-hours

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_uuid

Yes

String

Definition:

32-character UUID of a project, which uniquely identifies a project. Obtain the value of this parameter from the project_id field in the response body of the Querying the Project List API.

Constraints:

The value must contain 32 characters. Digits and letters are allowed.

Value range:

N/A

Default value:

N/A

issue_id

Yes

String

Definition:

Work item ID, which can be obtained from the Performing Advanced Query of Work Items API. The value of the id field in the response message body is the work item ID.

Constraints:

The value must contain 1 to 10 digits.

Value range:

Minimum length: 1 character. Maximum length: 10 characters.

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token by calling the IAM API forobtaining a user token. The value of X-Subject-Token in the response header is the user token.

Constraints:

Mandatory.

Value range:

Minimum length: 10 characters. Maximum length: 32,768 characters.

Default value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

start_date_timestamp

No

Integer

Definition:

Start time, in timestamp format, for example, 1839340800000.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

due_date_timestamp

No

Integer

Definition:

End time, in timestamp format, for example, 1839340800000.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

start_date

No

String

Definition:

Start time in the format of yyyy-MM-dd, for example, 2025-07-25.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

due_date

No

String

Definition:

End time in the format of yyyy-MM-dd, for example, 2025-07-25.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

use_timestamp

No

Boolean

Definition:

Whether to use the timestamp.

Constraints:

N/A

Value range:

true: yes

false: no.

Default value:

N/A

work_hours

No

Integer

Definition:

Workloads (unit: person-hour).

Constraints:

N/A

Value range:

N/A

Default value:

N/A

include_weekends

No

Integer

Definition:

Whether weekends are included.

Constraints:

N/A

Value range:

0 (not included)

1 (included)

Default value:

N/A

type

No

Integer

Definition:

Total workloads.

Constraints:

N/A

Value range:

0 (eight hours totally)

1 (eight hours a day)

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

result object

Definition:

Returned result.

status

String

Definition:

Returned status.

Value range:

success: Command execution succeeds.

error: Command execution failed.

Table 5 result

Parameter

Type

Description

list

Array of list objects

Definition:

Workload record list.

Table 6 list

Parameter

Type

Description

id

String

Definition:

Workload record ID.

Value range:

N/A

issue_id

Integer

Definition:

Work item ID.

Value range:

N/A

user_id

String

Definition:

User ID.

Value range:

N/A

user_num_id

Integer

Definition:

Digital ID of a user.

Value range:

N/A

user_name

String

Definition:

Username.

Value range:

N/A

nick_name

String

Definition:

User alias.

Value range:

N/A

work_date

String

Definition:

Work time in the format of yyyy/MM/dd, for example, 2025/07/25.

Value range:

N/A

work_date_timestamp

String

Definition:

Working time in timestamp format, for example, 1839340800000.

Value range:

N/A

work_hours

String

Definition:

Workloads (unit: person-hour).

Constraints:

N/A

Value range:

N/A

Default value:

N/A

region

String

Definition:

Region.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Example Requests

/v3/projects/381fcca9c056482d92da3e8b9da71db5/issues/69813204/work-hours

{
  "start_date_timestamp" : 1753372800000,
  "due_date_timestamp" : 1753459199999,
  "start_date" : "2025-07-25",
  "due_date" : "2025-07-25",
  "use_timestamp" : true,
  "work_hours" : 1,
  "include_weekends" : 0,
  "type" : 0
}

Example Responses

Status code: 200

Returned result of adding workloads for a work item.

{
  "result" : {
    "list" : [ {
      "id" : "78c74003692311f0aa95fa163e60f658",
      "issue_id" : 69813204,
      "user_id" : "073a9e23188025b31f06c0104a74c376",
      "user_num_id" : 233087,
      "user_name" : "hw_008618814464665_01",
      "nick_name" : "asdf4",
      "work_date" : "2025/07/25",
      "work_date_timestamp" : "1753372800000",
      "work_hours" : "1.0",
      "region" : "example"
    } ]
  },
  "status" : "success"
}

Status Codes

Status Code

Description

200

Returned result of adding workloads for a work item.

Error Codes

See Error Codes.