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.
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
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 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 |
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 API for querying the release/sprint plan details. The value of the id field in the response message body is the release plan ID. Constraints N/A Range N/A Default Value N/A |
| plan_iteration | No | Array of strings | Definition Array of sprint plan IDs, which can be obtained using the API for querying the release/sprint plan details. The value of the id field in the response message body is the sprint plan ID. Constraints N/A Range N/A Default Value N/A |
| workitem_id | No | Array of strings | Definition Array of work item IDs, which can be obtained using the API for querying work item details. The value of the id field in the response message body is the work item ID. Constraints N/A Range N/A Default Value N/A |
| created_by | No | Array of strings | Definition Creator ID array. Obtain it by calling the API for querying project members. The value of id in the response message body is the user ID. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | Yes | String | Definition Start page number. The value starts from 0 and is an integer multiple of limit. Constraints Start from 0. Range Min. 0. Default Value 0 |
| limit | Yes | String | Definition Number of records displayed on each page. The maximum value is 200. Constraints N/A Range 1 to 200. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition Response status. Range |
| message | String | Definition Response body message. Range N/A |
| result | Array of WorkHourInfoVO objects | Definition Return data. |
| page | PageVO object | Definition 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). Range 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. Range N/A |
| work_hours | String | Definition Workload. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| plan_pi | String | Definition Release plan ID. Range N/A |
| sum_workload_man_day | String | Definition Actual workloads. Range N/A |
| workload_man_day | String | Definition Planned workloads. Range N/A |
| convolution_plan_hours | String | Definition Planned roll-up workloads. Range N/A |
| convolution_actual_hours | String | Definition Actual roll-up workloads. Range N/A |
| id | String | Definition Work item ID. Range N/A |
| plan_iteration | String | Definition Sprint ID. 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 |
| Parameter | Type | Description |
|---|---|---|
| page | String | Definition Current page. Range N/A |
| size | String | Definition Number of records on each page. Range N/A |
| count | String | Definition Total number. Range N/A |
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
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
{
"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.
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