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

Querying Work Items of a Project

Function

Work item type ID, which is a pagination parameter and is used to query work items of a project by creation time.

URI

GET /v4/projects/{project_id}/issues

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.

Minimum: 0

limit

No

Integer

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

Minimum: 1

Maximum: 100

tracker_id

No

Integer

Type

Enumeration values:

  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

created_time_interval

No

String

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

updated_time_interval

No

String

Time when a work item is updated (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 a user token. The token can be obtained by calling the IAM API used to obtain a user token. 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

issues

Array of IssueItemSfV4 objects

Item

total

Integer

Total

Table 5 IssueItemSfV4

Parameter

Type

Description

actual_work_hours

Double

Indicates the actual person-hours.

assigned_user

IssueUser object

  

author

IssueUser object

  

begin_time

Long

Work Item Start Time

closed_time

Long

Time when a work item is closed.

created_time

Long

Created

custom_feilds

Array of CustomFeildRecord objects

Custom attributes.

developer

IssueUser object

  

discover_version

String

Version Where the Problem Is Found

end_time

Long

Work Item End Time

done_ratio

Integer

Work Item Progress Value

expected_work_hours

Double

Expected

order

Integer

Order.

Minimum: 1

Maximum: 100

parent_issue_id

Integer

ID of the parent work item.

release_version

String

Released Version

root_issue_id

Integer

ID of the root work item.

story_point

story_point object

Indicates the ID, 1 '0', 2 '1/2', 3 '1' , 4 '2' , 5 '3' , 6 '5' , 7 '8' , 8 '13' , 9 '21' , 10 '40' , 11 '80' , 12 '100' , 13 '∞' , 14 '?' ,

domain

domain object

ID, domain 14, 'Performance', 15, 'Function', 16, 'Reliability' 17,'Network security' 18, 'Maintainability' 19,'Other DFX' 20, 'Availability'

iteration

iteration object

Sprint

module

module object

Module

priority

priority object

Work Item Priority

severity

severity object

Work Item Importance

status

status object

Work Item Statuses

tracker

tracker object

Work item type. The options are as follows: 2: task; 3: defect /Bug,5Epic,6Feature,7Story.

subject

String

Indicates the title of the work item.

updated_time

Long

Work Item Update Time

Table 6 CustomFeildRecord

Parameter

Type

Description

key

String

Customizing Work Item Attributes

name

String

User-defined Work Item Name

value

String

User-defined Work Item Value

Table 7 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

Table 8 story_point

Parameter

Type

Description

id

Integer

Story point ID.

name

String

Story Point

Table 9 domain

Parameter

Type

Description

id

Integer

Identifies a domain.

name

String

fields

Table 10 iteration

Parameter

Type

Description

id

Integer

Identifies a sprint.

name

String

Iteration Name

Table 11 module

Parameter

Type

Description

id

Integer

Specifies the module ID.

name

String

Module

Table 12 priority

Parameter

Type

Description

id

Integer

Identifies a priority.

name

String

Priority

Table 13 severity

Parameter

Type

Description

id

Integer

Identifies a severity.

name

String

Indicates the level of severity.

Table 14 status

Parameter

Type

Description

id

Integer

Status ID.

name

String

Event Name

Table 15 tracker

Parameter

Type

Description

id

Integer

Type ID

name

String

Object

Status code: 400

Table 16 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 17 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

Get https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues

Get https://{endpoint}/v4/projects/526cefde62004de2b62b5e8dd2c2b3af/issues

Example Responses

Status code: 200

OK

{
  "issues" : [ {
    "actual_work_hours" : 10,
    "assigned_user" : {
      "id" : 4091,
      "name" : "demo_user_name",
      "nick_name" : "demo"
    },
    "author" : {
      "id" : 4091,
      "name" : "demo_user_name",
      "nick_name" : "demo"
    },
    "begin_time" : 1590940800000,
    "closed_time" : 1590940800000,
    "created_time" : 1590940800000,
    "custom_feilds" : [ {
      "key" : "customField15",
      "name" : "single",
      "value" : "15Demo"
    } ],
    "developer" : {
      "id" : 4091,
      "name" : "demo_user_name",
      "nick_name" : "demo"
    },
    "discover_version" : "ProjectMan 8.0.0",
    "end_time" : 1590940800000,
    "done_ratio" : 0,
    "expected_work_hours" : 9,
    "order" : 1,
    "parent_issue_id" : 123,
    "release_version" : "ProjectMan 8.0.0",
    "root_issue_id" : 0,
    "story_point" : {
      "id" : 1,
      "name" : "0"
    },
    "domain" : {
      "id" : 14,
      "name" : ""
    },
    "iteration" : {
      "id" : 456,
      "name" : "1"
    },
    "module" : {
      "id" : 456,
      "name" : "Project"
    },
    "priority" : {
      "id" : 1,
      "name" : ""
    },
    "severity" : {
      "id" : 12,
      "name" : ""
    },
    "status" : {
      "id" : 1,
      "name" : ""
    },
    "tracker" : {
      "id" : 7,
      "name" : "story"
    },
    "subject" : "demo",
    "updated_time" : 1576114296000
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.