Help Center/ CodeArts Req/ API Reference/ APIs/ Work Items of the Scrum Project/ Querying Historical Records of All Work Items in a Project
Updated on 2023-06-12 GMT+08:00

Querying Historical Records of All Work Items in a Project

Function

Querying Historical Records of All Work Items in a Project

URI

GET /v4/projects/{project_id}/issues/records

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the 32-bit ID of the devcloud project.

Minimum: 32

Maximum: 32

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

The offset starts from 0 and is an integer multiple of limit. limit=10,offset=0,10,20...

Minimum: 0

Default: 0

limit

No

Integer

The minimum number of records on each page is 1 and the maximum number is 100.

Minimum: 1

Maximum: 100

Default: 100

operated_time_interval

No

String

Time when a work item is changed (start time and end time of the query).

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Minimum: 10

Maximum: 32768

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

records

Array of IssueAttrHistoryRecord objects

Scaling History

total

Integer

Total

Table 5 IssueAttrHistoryRecord

Parameter

Type

Description

field_key

String

Field to Be Operated

field_name

String

Meanings of operation fields

id

Long

Specifies the historical record ID.

issue_id

Long

Identifies a work item.

new_value

String

New value, which is a JSON character string.

old_value

String

Value before the change, which is a JSON character string.

operated_time

Long

Time when the change occurs.

operation

String

Operation type, which can be create, modify, or delete.

operator

IssueUser object

  

property

String

Changed Attribute

Table 6 IssueUser

Parameter

Type

Description

user_id

String

uuid

user_num_id

Integer

id

id

Integer

Specifies the user ID.

name

String

User Name

nick_name

String

Nickname

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

GET https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues/records

GET https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues/records

Example Responses

Status code: 200

OK

{
  "records" : [ {
    "field_key" : "status",
    "field_name" : "",
    "id" : 789,
    "issue_id" : 123,
    "new_value" : "{\"id\":\"2\", \"name\":\"\"}",
    "old_value" : "{\"id\":\"1\", \"name\":\"\"}",
    "operated_time" : 1601175640000,
    "operation" : "",
    "operator" : {
      "id" : 4091,
      "name" : "demo_user_name",
      "nick_name" : ""
    },
    "property" : "attr"
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.