Updated on 2023-06-12 GMT+08:00

Obtaining the Work Item History

Function

Obtaining the Work Item History

URI

GET /v4/projects/{project_id}/issue/{issue_id}/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

issue_id

Yes

Integer

Identifies a work item.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Specifies the paging index and offset. offset is an integer multiple of limit. limit=10,offset=0,10,20...

Minimum: 0

Default: 0

limit

No

Integer

Number of records displayed on each page. A maximum of 100 records can be displayed on each page.

Minimum: 1

Maximum: 1000

Default: 10

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

id

Integer

Operation record ID (discarded).

created_time

Long

Creation time (discarded).

records

Array of IssueRecordV4 objects

Scaling History

total

Integer

Total number of operation records.

Table 5 IssueRecordV4

Parameter

Type

Description

id

Integer

Operation record ID.

created_time

Long

Time when an operation record is created.

user

user object

User who operates a work item.

details

Array of details objects

Operation Records

Table 6 user

Parameter

Type

Description

user_num_id

Integer

User ID

user_name

String

LoginName

nick_name

String

Nickname

user_id

String

32-bit UUID of a user.

Table 7 details

Parameter

Type

Description

property

String

Operation Attribute

old_value

String

Last Record

new_value

String

Current Value

operation

String

Operation

id

Integer

ID of an operation record.

name

String

Field to Be Operated

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

Get https://{endpoint}/v4/projects/e2da96a5d2c845e284f0ad47f8ca8cb1/issue/3458/records

Get https://{endpoint}/v4/projects/e2da96a5d2c845e284f0ad47f8ca8cb1/issue/3458/records

Example Responses

Status code: 200

OK

{
  "id" : 1221,
  "created_time" : "1597116605000",
  "records" : [ {
    "id" : 1234,
    "created_time" : 1617764919000,
    "user" : {
      "user_num_id" : 4091,
      "user_name" : "demo_user_name",
      "nick_name" : "aaa",
      "user_id" : "a360371833bf4c558f796fd707b44daf"
    },
    "details" : [ {
      "property" : 1,
      "old_value" : 1,
      "new_value" : 2,
      "operation" : "",
      "id" : 3597,
      "name" : ""
    } ]
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.