Querying the Work Hour List Based on Criteria (Pagination)
Function
This API is used to query the workload list by condition.
Calling Method
For details, see Calling APIs.
URI
POST /v1/ipdprojectservice/projects/{project_id}/work-hour/query
| 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 Querying the IPD Project List API. The value of id in the response message body is the project ID. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| params | Yes | WorkHourParamVO object | Definition: Condition input parameter. |
| page_info | Yes | RequestPageInfoVO object | Definition: Pagination parameter. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| plan_pi | No | Array of strings | Definition: Array of release plan IDs, which can be obtained using the Querying the Release/Sprint Plan Details API. The value of the id field in the response message body is the release plan ID. Constraints: N/A Options: N/A Default value: N/A |
| plan_iteration | No | Array of strings | Definition: Array of sprint plan IDs, which can be obtained using the Querying the Release/Sprint Plan Details API. The value of the id field in the response message body is the sprint plan ID. Constraints: N/A Options: N/A Default value: N/A |
| workitem_id | No | Array of strings | Definition: Array of work item IDs, which can be obtained using the Querying Work Item Details API. The value of the id field in the response message body is the work item ID. Constraints: N/A Options: N/A Default value: N/A |
| created_by | No | Array of strings | Definition: Creator ID array. You can obtain the value using the API for obtaining the current user information. The value of user_id in the response body is the creator ID. Constraints: N/A Value range: N/A Default value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | Yes | String | Definition: Offset. Constraints: Minimum value: 0. Value range: Minimum value: 0. Default value: 0 |
| limit | Yes | String | Definition: Number of records displayed on each page. The maximum value is 200. Constraints: N/A Options: Minimum value: 1. Maximum value: 200. Default value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition: Returned status. Value range: success: The response is successful. error: The response failed. |
| message | String | Response body message. |
| result | Array of WorkHourInfoVO objects | Returned data. |
| page | PageVO object | Pagination information. |
| Parameter | Type | Description |
|---|---|---|
| workitem | workitem object | Definition: Work item information. |
| work_date | String | Definition: Work date, which is a Unix timestamp (unit: millisecond). Options: N/A |
| created_by | UserEntity object | Definition: Creator information. |
| work_hour_category | String | Definition: Unique ID of the work type. If the value is set to value, the value displayed on the page is display_value. Options: N/A |
| work_hours | String | Definition: Workloads. Options: N/A |
| Parameter | Type | Description |
|---|---|---|
| plan_pi | String | Definition: Release plan ID. Options: N/A |
| sum_workload_man_day | String | Definition: Actual workloads. Options: N/A |
| workload_man_day | String | Definition: Planned workloads. Options: N/A |
| convolution_plan_hours | String | Definition: Planned roll-up workloads. Options: N/A |
| convolution_actual_hours | String | Definition: Actual roll-up workloads. Options: N/A |
| id | String | Definition: Work item ID. Value range: N/A |
| plan_iteration | String | Definition: Sprint ID. Options: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: User ID. You can obtain the value using the API for obtaining the current user information. The value of id in the response body is the user ID. Constraints: N/A Value range: N/A Default value: N/A |
| name | String | Definition: Username. Constraints: N/A Value range: Minimum length: 2 characters. Maximum length: 64 characters. Default value: N/A |
| nick_name | String | Definition: User alias. Constraints: N/A Value range: Minimum length: 2 characters. Maximum length: 30 characters. Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| page | String | Current page. |
| size | String | Number of records on each page. |
| count | String | Total number of data records. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Definition: Error code. Value range: N/A |
| error_msg | String | Definition: Error description, which is a supplement to error_code. Value range: N/A |
Example Requests
Querying work hours in a project by work item ID
POST https://{endpoint}/v1/ipdprojectservice/projects/05c7d8bcf3db4829bc841e4ba93aaea5/work-hour/query
{
"params" : {
"plan_pi" : [ ],
"plan_iteration" : [ ],
"workitem_id" : [ "976857692367659008" ],
"created_by" : [ ]
},
"page_info" : {
"offset" : 0,
"limit" : 200
}
} Example Responses
Status code: 200
Returning work hour and pagination information
{
"status" : "success",
"message" : null,
"result" : [ {
"workitem" : {
"plan_pi" : null,
"sum_workload_man_day" : "112.00",
"convolution_actual_hours" : null,
"id" : "976857692367659008",
"plan_iteration" : null
},
"work_date" : "1706803200000",
"created_by" : {
"id" : "a360371833bf4c558f796fd707b44daf",
"name" : "devcloud_devcloud_01",
"nick_name" : "Test account"
},
"work_hour_category" : "R&D design",
"work_hours" : 6
} ],
"page" : {
"page" : 1,
"size" : 200,
"count" : 1
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Returning work hour and pagination information |
| 400 | Error response body. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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