Querying Work Item History of an IPD Project
Function
This API is used to query work item history of an IPD project.
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
GET /v1/ipdprojectservice/projects/{project_id}/issues/{issue_id}/history
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Definition Number of data records returned on each page. Constraints N/A Range 1 to 200. Default Value 20 |
| offset | No | Integer | Definition Start page number. The value starts from 0 and is an integer multiple of limit. Constraints The value must be a multiple of limit. Range ≥ 0 Default Value 0 |
| start_date | No | Long | Definition Start date and time timestamp. It must be used together with end_date. Constraints Must be earlier than the current time. The minimum unit is day. Range N/A Default Value N/A |
| end_date | No | Long | Definition End date and time timestamp. It must be used together with start_date. Constraints Must be later than the current work item creation time. The minimum unit is day. Range N/A Default Value N/A |
| return_fields | No | String | Definition Operation records of a specific field to be returned. Constraints 0 to 32 characters. Range Unique code of the corresponding field. The optional values can be obtained by calling the Querying Field Templates API. The code in the response body is the unique identifier of the field. Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| result | HistoryDataVO object | Definition History record result set. Range N/A |
| status | String | Definition Request result. Range |
| message | String | Definition Error message returned when the request fails. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| data | Array of HistoryVO objects | Definition Array of history record objects. Range N/A |
| page | Integer | Definition Page number. Range Minimum: 1. Maximum: No limit. |
| size | Integer | Definition Page size. Range N/A |
| total | Integer | Definition Total number of history records. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| batch | String | Definition Batch of the history record. Range N/A |
| date | String | Definition Timestamp of the history record generation date. Range N/A |
| user | String | Definition ID of the user who generated the history record. Range N/A |
| user_info | UserEntity object | Definition User object that generated the history record. Range N/A |
| items | Array of HistoryItemVO objects | Definition History record operation item. Range N/A |
| issue_id | String | Definition ID of the work item associated with the history record. Range N/A |
| issue_category | String | Definition Work item type. Range Multiple work item types are supported, separated by commas (,).
|
| 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 |
|---|---|---|
| operation | String | Definition Operation type. Range N/A |
| display_operation | String | Definition Display value of the operation type, describing the specific operation. Range N/A |
| field_info | HistoryFieldInfo object | Definition Basic information of the operated field. Range N/A |
| current_value | Object | Definition Value after the field is modified. Range N/A |
| previous_value | Object | Definition Value after the field is modified. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition ID of the modified field in the history record. Range N/A |
| display_name | String | Definition Display name of the modified field in the history record. Range N/A |
| name | String | Definition Code of the modified field in the history record, used as the unique identifier of the field. Range N/A |
| field_type_id | String | Definition ID of the modified field type in the history record. Range |
| field_type_name | String | Definition Type name of the modified field in the history record. Range |
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
GET https://{endpoint}/v1/ipdprojectservice/projects/{project_id}/issues/{issue_id}/history?return_fields=&offset=0&limit=20 Example Responses
Status code: 200
{
"result" : {
"data" : [ {
"batch" : "33fedc760b0149d985ff135778101e21",
"date" : "1744701473656",
"user" : "a360371833bf4c558f796fd707b44daf",
"user_info" : {
"id" : "a360371833bf4c558f796fd707b44daf",
"name" : "devcloud_devcloud_01",
"nick_name" : "Tom"
},
"items" : [ {
"operation" : "ASSIGN",
"display_operation" : "Updated the status",
"field_info" : {
"id" : "10005",
"display_name" : "Status",
"name" : "status",
"field_type_id" : "10007",
"field_type_name" : "Single-choice list"
},
"current_value" : [ {
"id" : "1050710945722966043",
"belonging" : "START",
"display_value" : "Submit",
"code" : "Committed",
"created_by" : "a360371833bf4c558f796fd707b44daf",
"modified_by" : "a360371833bf4c558f796fd707b44daf",
"modified_time" : "1728438610725"
} ],
"previous_value" : [ ]
} ],
"issue_id" : "1118922335965982721",
"issue_category" : "RR"
} ],
"page" : 1,
"size" : 20,
"total" : 2
},
"status" : "success",
"message" : null
} Status code: 400
{
"error_code" : "PM.02174103",
"error_msg" : "No permission."
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response for a successful history record query. |
| 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