Modifying Workloads
Function
This API is used to modify workloads.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
PUT /v1/projects/{project_id}/work-items/{issue_id}/work-hour/{workhour_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition 32-character ID of a project, which must be unique. Obtain the value by calling the API for querying the IPD project list. The value of id in the response message body is the project ID. Constraints N/A Range A string of 32 characters consisting of letters and digits. Default Value N/A |
| issue_id | Yes | String | Definition Unique ID of a work item. You can obtain the value from the Querying Work Items or Querying Tree-shaped Work Items API. The value is id in the response body. Constraints N/A Range A string of 18 to 19 digits. Default Value N/A |
| workhour_id | Yes | String | Workload ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| work_hour_category | No | String | value is the unique identifier of the parameter and the value displayed on the page is display_value. |
| work_hours | No | String | Workloads. |
| description | No | String | Work content. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition Response status. Range |
| message | String | Definition Response message. When the request fails, the failure cause is returned. Range 0 to 1,000 characters. |
| result | WorkHourTotalVO object | Definition List of workload information and total workloads. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| data | Array of WorkHourVO objects | Work hour information list. |
| work_hours_total | String | Total actual work hours. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Workload record ID. Range A string of 18 to 19 digits. |
| title | String | Definition Workload name. Range N/A |
| operation_id | String | Definition Operation ID, which identifies a specific operation record. Range N/A |
| description | String | Definition Description of the work content. Range Max. 10,000 characters. |
| workitem_id | String | Definition ID of the work item associated with the workload. You can obtain the value from the Querying Work Items or Querying Tree-shaped Work Items API. The value is id in the response body. Range A string of 18 to 19 digits. |
| work_date | String | Definition Timestamp of the work time, in milliseconds. Range N/A |
| created_by | UserEntity object | Definition Creator of the workload record. |
| modified_by | UserEntity object | Definition Information about the last person who modifies the workload record. |
| work_hour_category | String | Definition Work type. The value displayed on the page is display_value, and the unique ID is value. Range N/A |
| work_hours | Double | Definition Time spent (person-days). Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition User ID. Obtain it by calling the API for querying project members. The value of id in the response message body is the user ID. Range N/A |
| name | String | Definition Username. Range 2 to 64 characters. |
| nick_name | String | Definition User alias. Range 2 to 30 characters |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition Error code. Range N/A |
| error_msg | String | Definition Error description, which is a supplement to error_code. Range N/A |
Example Requests
Modifying workloads
PUT https://{endpoint}/v1/projects/dbf92424384e46dd9829492abe533829/work-items/1038401818296492033/work-hour/1038556057203286016
{
"work_hours" : "321",
"work_hour_category" : "Backend development",
"description" : "Work content."
} Example Responses
Status code: 200
{
"status" : "success",
"message" : null,
"result" : {
"data" : [ {
"id" : "1038556057203286016",
"description" : "1133",
"workitem_id" : "1038401818296492033",
"created_by" : {
"id" : "a360371833bf4c558f796fd707b44daf",
"name" : "devcloud_devcloud_01",
"nick_name" : "t"
},
"modified_by" : {
"id" : "a360371833bf4c558f796fd707b44daf",
"name" : "devcloud_devcloud_01",
"nick_name" : "t"
},
"work_hour_category" : "Backend development",
"work_hours" : 321
} ],
"work_hours_total" : 387.7
}
} Status code: 400
{
"error_code" : "PM.02174103",
"error_msg" : "No permission."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Returned workload information and total workloads |
| 400 | Response upon a request failure. For example, the user does not have the operation permission or the project does not exist. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot