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, which must be used together with end_date. Constraints: The value 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, which must be used together with start_date. Constraints: The value must be later than the time when the work item was created. The minimum unit is day. Range: N/A Default Value: N/A |
| return_fields | No | String | Definition: Operation record of returning a field. Constraints: 0 to 32 characters. Range: Unique code of the corresponding field. Obtain the value from the API for querying field templates. The value is code in the response body. Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| result | HistoryDataVO object | Definition: Historical record result set. Range: N/A |
| status | String | Definition: Request result. Range: success and failed |
| message | String | Definition: Error message for request failure. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| data | Array of HistoryVO objects | Definition: Array of historical record objects. Range: N/A |
| page | Integer | Definition: Pagination number. Range: ≥ 1 |
| size | Integer | Definition: Page size. 1 and the maximum value is 200. Range: N/A |
| total | Integer | Definition: Total number of historical records. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| batch | String | Definition: Batch of the historical record. Range: N/A |
| date | String | Definition: Timestamp of the date when the historical record is generated. Range: N/A |
| user | String | Definition: ID of the user who generates the historical record. Range: N/A |
| user_info | UserEntity object | Definition: User object that generates the historical record. Range: N/A |
| items | Array of HistoryItemVO objects | Definition: Operation item of the historical record. Range: N/A |
| issue_id | String | Definition: ID of the work item associated with the historical record. Range: N/A |
| issue_category | String | Definition: Work item type. Range: Multiple values are supported. Use commas (,) to separate them. |
| 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, which describes the operation. Range: N/A |
| field_info | HistoryFieldInfo object | Definition: Basic information about the operated field. Range: N/A |
| current_value | Object | Definition: Field value after modification. field_type_id in field_info. Whenfield_type_id is 10007 and field_id is 10005, the field type is StatusEntity. When field_type_id is 10007 or 10008, the value is a character string and is an option value. When field_type_id is 10003 or 10004, the value is a datetime. When field_type_id is 10005 or 10006, the value is a number. When field_type_id is 10009 or 10010, the value is a UserEntity array. Range: N/A |
| previous_value | Object | Definition: Field value after modification. field_type_id in field_info. Whenfield_type_id is 10007 and field_id is 10005, the field type is StatusEntity. When field_type_id is 10007 or 10008, the value is a character string and is an option value. When field_type_id is 10003 or 10004, the value is a datetime. When field_type_id is 10005 or 10006, the value is a number. When field_type_id is 10009 or 10010, the value is a UserEntity array. Range: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition: ID of the modified field in the historical record. Range: N/A |
| display_name | String | Definition: Display name of the modified field in the historical record. Range: N/A |
| name | String | Definition: Code of the modified field in the historical record, which is used as the unique identifier of the field. Range: N/A |
| field_type_id | String | Definition: ID of the modified field type in the historical record. Range: 10001 (single-choice list), 10002 (multi-choice list), 10003 (date), 10004 (date and time), 10005 (integer), 10006 (decimal), 10007 (single-line text), 10008 (multi-line text), 10009 (single-selection user), 10010 (multi-selection user), and 10011 (hierarchy). |
| field_type_name | String | Definition: Name of the field type to be modified in the historical record. Range: single-choice list, multi-choice list, date, date and time, integer, decimal, single-line text, multi-line text, single-choice user, multi-choice user, and hierarchical field. |
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 | Historical responses |
| 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