# 获取历史操作记录V2 - ListRecordsV2
#### 功能介绍
获取历史操作记录V2。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-projectman/projectman_api_1002.html)。
#### 授权信息
当前API调用无需身份策略权限。
#### URI
GET /v2/issues/get-record
表1Query参数 
| 参数         | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|:---|
| project_id | 是    | String  | **参数解释**： 项目的32位uuid，项目唯一标识，通过[查询项目列表](https://support.huaweicloud.com/api-projectman/ListProjectsV4.html)接口获取，响应消息体中的**project_id**字段的值就是项目ID。 **约束限制**： 32位的数字和字母组成的字符串。 **取值范围**： 不涉及。 **默认取值**： 不涉及。 |
| issue_id   | 是    | Integer | **参数解释：** 工作项id，可通过[高级查询工作项](https://support.huaweicloud.com/api-projectman/ListIssuesV4.html)接口获取，响应消息体中的**id**字段的值就是工作项id。 **约束限制：** 长度在1位到10位之间的纯数字。 **取值范围：** 最小长度：1，最大长度：10。 **默认取值：** 不涉及。         |
| limit      | 否    | Integer | **参数解释：** 条数，每页显示查询的数量。 **约束限制：** 不涉及。 **取值范围：** 最小长度：1，最大长度：10。 **默认取值：** 10。                                                                                                                           |
| offset     | 否    | Integer | **参数解释：** 分页索引，偏移量，offset是limit的整数倍数。例如，offset为0表示从第一个记录开始，offset为10表示从第11个记录开始。 **约束限制：** 不涉及。 **取值范围：** 最小值：0，最大值：10000。 **默认取值：** 缺省值：0。                                                              |
| type       | 否    | String  | 参数解释： 项目类型。 约束限制： 不涉及。 取值范围： "scrum"。 默认取值： 不涉及。                                                                                                                                                         |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表2响应Body参数 
| 参数     | 参数类型                                             | 描述                                                                                                                                          |
|:---|:---|:---|
| result | [result] object | **参数解释：** 返回结果。                                                                                            |
| status | String                                           | **参数解释：** 返回状态。 **取值范围：** success，error。 |
   
 表3result 
| 参数             | 参数类型                                                                   | 描述                                                                                                                                                                  |
|:---|:---|:---|
| offset         | Integer                                                                | **参数解释：** 分页索引，偏移量，offset是limit的整数倍数。 **取值范围：** 最小值：0，最大值：10000。 |
| record         | Array of [RecordRecord] objects | **参数解释：** 历史记录列表。                                                                                                                  |
| limit          | Integer                                                                | **参数解释：** 条数，每页显示查询的数量。 **取值范围：** 最小值：1，最大值：1000。                |
| journals_total | Integer                                                                | **参数解释：** 日志记录的总数。 **取值范围：** 不涉及。                                |
   
 表4RecordRecord 
| 参数         | 参数类型                                                                     | 描述                                                                                                                                                 |
|:---|:---|:---|
| id         | Integer                                                                  | **参数解释：** 历史记录的操作批次id，同时操作的id相同。 **取值范围：** 不涉及。 |
| notes      | String                                                                   | **参数解释：** 与日志记录相关的备注或注释。 **取值范围：** 不涉及。         |
| created_on | String                                                                   | **参数解释：** 历史记录创建的时间戳。 **取值范围：** 不涉及。            |
| user       | [IssueUserVO] object               | **参数解释：** 操作人信息。                                                                                                  |
| details    | Array of [DetailsRecord] objects | **参数解释：** 历史记录的详细信息。                                                                                              |
   
 表5IssueUserVO 
| 参数         | 参数类型    | 描述                                                                                                                                     |
|:---|:---|:---|
| first_name | String  | **参数解释：** 用户名称。 **取值范围：** 不涉及。      |
| identifier | String  | **参数解释：** 作者唯一标识id。 **取值范围：** 不涉及。  |
| image_id   | String  | **参数解释：** 用户头像id。 **取值范围：** 不涉及。    |
| nick_name  | String  | **参数解释：** 用户昵称。 **取值范围：** 不涉及。      |
| name       | String  | **参数解释：** 带租户信息的用户名。 **取值范围：** 不涉及。 |
| id         | Integer | **参数解释：** 用户数字id。 **取值范围：** 不涉及。    |
   
 表6DetailsRecord 
| 参数         | 参数类型    | 描述                                                                                                                                                 |
|:---|:---|:---|
| id         | Integer | **参数解释：** 历史记录id。 **取值范围：** 不涉及。                |
| journal_id | Integer | **参数解释：** 历史记录id。 **取值范围：** 不涉及。                |
| property   | String  | **参数解释：** 发生变化的属性（示例：attr）。 **取值范围：** 不涉及。      |
| new_value  | String  | **参数解释：** 修改属性后的新值。 **取值范围：** 不涉及。              |
| name       | String  | **参数解释：** 历史记录操作的字段名称。 **取值范围：** 不涉及。           |
| operation  | String  | **参数解释：** 对属性执行的操作（示例：新建、删除、修改）。 **取值范围：** 不涉及。 |
| old_value  | String  | **参数解释：** 修改属性前的值。 **取值范围：** 不涉及。               |
   
#### 请求示例
```
GET http://{endpoint}/v2/issues/get-record?issue_id=9175005&project_id=c15cc54e338d4506afd9bd8103071ff0&limit=10&offset=0&type=scrum&_=1753080349806
```
#### 响应示例
**状态码：200**
```
{
  "result" : {
    "offset" : 0,
    "record" : [ {
      "id" : 11248513,
      "created_on" : "1752829690000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270161,
        "journal_id" : 11248513,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "1752854400000",
        "name" : "due_date",
        "operation" : "批量编辑"
      } ]
    }, {
      "id" : 11248513,
      "created_on" : "1752829690000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270162,
        "journal_id" : 11248513,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "1752768000000",
        "name" : "start_date",
        "operation" : "批量编辑"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270149,
        "journal_id" : 11248512,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "444",
        "name" : "subject",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270150,
        "journal_id" : 11248512,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "<p style=\"padding-top: 5.0px;\"><span style=\"font-weight: bold;\"> 作为 </span><用户角色></p><p><br></p><p style=\"padding-top: 5.0px;\"><span style=\"font-weight: bold;\"> 我想要 </span><结果></p><p><br></p><p style=\"padding-top: 5.0px;\"><span style=\"font-weight: bold;\"> 以便于 </span><目的>&nbsp;</p>",
        "name" : "description",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270151,
        "journal_id" : 11248512,
        "property" : "attr",
        "new_value" : "新建",
        "name" : "status_id",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270152,
        "journal_id" : 11248512,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "xxxxxx",
        "name" : "assigned_to_id",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270153,
        "journal_id" : 11248512,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "1",
        "name" : "order",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270154,
        "journal_id" : 11248512,
        "property" : "attr",
        "new_value" : "中",
        "name" : "priority_id",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270155,
        "journal_id" : 11248512,
        "property" : "attr",
        "new_value" : "一般",
        "name" : "severity_id",
        "operation" : "新建"
      } ]
    }, {
      "id" : 11248512,
      "notes" : "",
      "created_on" : "1752829683000",
      "user" : {
        "id" : 1111,
        "name" : "xxxxxx",
        "first_name" : "xxxxxx",
        "identifier" : "xxxxxx",
        "nick_name" : "xxxxxx"
      },
      "details" : [ {
        "id" : 15270156,
        "journal_id" : 11248512,
        "property" : "attr",
        "old_value" : "",
        "new_value" : "xxxxxx",
        "name" : "assigned_cc",
        "operation" : "新建"
      } ]
    } ],
    "limit" : 10,
    "journals_total" : 14
  },
  "status" : "success"
}
```
#### 状态码
| 状态码 | 描述               |
|:---|:---|
| 200 | 获取历史操作记录接口成功的响应。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-projectman/ErrorCode.html)。
