Help Center/ CodeArts Req/ API Reference/ API/ Scrum Project Work Items/ Conducting Advanced Query of My To-Do Work Items
Updated on 2026-10-13 GMT+08:00

Conducting Advanced Query of My To-Do Work Items

Function

This API is used to search my to-do list with the advanced query function.

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.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsreq:workitem:list

List

-

  • codeartsreq:Model

  • codeartsreq:ProjectId

-

-

URI

POST /v4/issues

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Constraints

N/A

Range

The value contains 10 to 32,768 characters.

Default Value

N/A

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Definition

Number of records on each page.

Constraints

1–100

Range

0–100

Default Value

N/A

offset

No

Integer

Definition

Start page number. The value starts from 0 and is an integer multiple of limit.

Constraints

Offset must be an integral multiple of limit. If limit equals 10, then valid offset values are 0, 10, 20, and so on.

Range

0–10000

Default Value

N/A

subject

No

String

Definition

Search keyword.

Constraints

1 to 100 non-whitespace characters.

Range

N/A

Default Value

N/A

created_on

No

String

Definition

Time range for creating a work item.

Constraints

A string of 1 to 13 digits. The first digit ranges from 1 to 9. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

updated_on

No

String

Definition

Time range for updating a work item.

Constraints

A string of 1 to 13 digits. The first digit ranges from 1 to 9. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

closed_on

No

String

Definition

Time range for ending a work item.

Constraints

A string of 1 to 13 digits. The first digit ranges from 1 to 9. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

start_date

No

String

Definition

Time range for the estimated start time of a work item.

Constraints

A string of 1 to 13 digits. The first digit ranges from 1 to 9. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

due_date

No

String

Definition

Time range for the estimated end time of a work item.

Constraints

A string of 1 to 13 digits or an empty string. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

tracker_id

No

String

Definition

Work item type.

Constraints

A single digit. Use commas (,) to separate multiple values.

Range

Work item type enumeration:

2 (task)

3 (bug)

5 (epic)

6 (feature)

7 (story)

Default Value

N/A

status_id

No

String

Definition

Work item status.

Constraints

1 to 64 non-whitespace characters.

Range

  • 1: new

  • 2: ongoing

  • 3: solved

  • 4: in testing

  • 5: closed

  • 6: rejected

  • Custom status.

Default Value

N/A

author_id

No

String

Definition

ID of the work item creator (both the user digital ID and user UUID are supported). You can query user ID information using the API for obtaining the current user information. The returned user_id is the user UUID, and user_num_id is the digital ID of the user.

Constraints

A string of 1 to 6 digits. The first digit ranges from 1 to 9. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

developer_id

No

String

Definition

ID of the work item developer (both the user digital ID and user UUID are supported). You can query user ID information using the API for obtaining the current user information. The returned user_id is the user UUID, and user_num_id is the digital ID of the user.

Constraints

A string of 1 to 6 digits. The first digit ranges from 1 to 9. Use commas (,) to separate values.

Range

N/A

Default Value

N/A

priority_id

No

String

Definition

Work item priority ID.

Constraints

A single digit. Use commas (,) to separate multiple values.

Range

Options:

1: low

2: medium

3: high

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

issue_list

Array of issue_list objects

Definition:

Work item information list.

total

Integer

Definition:

Total number of work items.

Options:

N/A

Table 4 issue_list

Parameter

Type

Description

actual_work_hours

Double

Definition:

Actual workloads.

assigned_to

SimpleUserIn object

Definition:

Handler.

author

SimpleUserIn object

Definition:

Author.

closed_flag

Integer

Definition:

Closing sign.

Options:

N/A

closeder

SimpleUserIn object

Definition:

Closer.

created_on

String

Definition:

Work item creation timestamp.

Options:

N/A

deleted

Boolean

Definition:

Whether to delete the work item. The options are true (delete) and false (not delete).

Options:

N/A

developer

SimpleUserIn object

Definition:

Developer.

domain

domain object

Definition:

Domain information.

done_ratio

Integer

Definition:

Work item completion rate.

Options:

N/A

due_date

String

Definition:

Estimated end timestamp for a work item.

Options:

N/A

expected_work_hours

Double

Definition:

Estimated workloads.

Options:

N/A

find_release_dev

String

Definition:

Released version where the bug was found.

Options:

N/A

id

Integer

Definition

Work item ID.

Range

N/A

is_watcher

Boolean

Definition:

Whether to follow the work item. The options are true (follow) and false (not follow).

Options:

N/A

module

module object

Definition:

Module information.

order

order object

Definition:

Priority sequence information.

parent_issue

parent_issue object

Definition:

Parent work item information.

parent_issue_id

Integer

Definition

Parent work item ID.

Range

N/A

position

Double

Definition:

Sorting value.

Options:

N/A

priority

priority object

Definition:

Work item priority information.

project

project object

Definition:

Project information.

release_dev

String

Definition:

Release version.

Options:

N/A

severity

severity object

Definition:

Severity information.

status

status object

Definition:

Work item status information.

subject

String

Definition:

Work item title.

Options:

N/A

tracker

tracker object

Definition:

Work item type information.

updated_on

String

Definition:

Work item update timestamp.

Options:

N/A

Table 5 SimpleUserIn

Parameter

Type

Description

id

Integer

Definition

User ID.

Range

N/A

identifier

String

Definition

User UUID.

Range

N/A

name

String

Definition:

Username.

Options:

N/A

image_id

String

Definition

User avatar ID.

Range

N/A

first_name

String

Definition

Username.

Range

N/A

last_name

String

Definition

Username.

Range

N/A

Table 6 domain

Parameter

Type

Description

id

Integer

Definition:

Domain ID.

Options:

N/A

name

String

Definition:

Domain name.

Options:

N/A

Table 7 module

Parameter

Type

Description

id

Integer

Definition

Module ID.

Range

N/A

name

String

Definition:

Module name.

Options:

N/A

path_name

String

Definition:

Module path name.

Options:

N/A

Table 8 order

Parameter

Type

Description

id

Integer

Definition:

Priority sequence ID.

Options:

N/A

name

String

Definition:

Priority sequence name.

Options:

N/A

Table 9 parent_issue

Parameter

Type

Description

id

Integer

Definition

Parent work item ID.

Range

N/A

subject

String

Definition:

Parent work item title.

Options:

N/A

Table 10 priority

Parameter

Type

Description

id

Integer

Definition:

Work item priority ID.

Options:

N/A

name

String

Definition:

Work item priority name.

Options:

N/A

Table 11 project

Parameter

Type

Description

id

Integer

Definition

Project ID.

Range

N/A

identifier

String

Definition

Project UUID.

Range

N/A

name

String

Definition:

Project name.

Options:

N/A

type

String

Definition:

Project type.

Value range:

scrum: Scrum project

normal: IPD project

xboard: Kanban project

Table 12 severity

Parameter

Type

Description

id

Integer

Definition:

Severity ID.

Options:

N/A

name

String

Definition:

Severity name.

Options:

N/A

Table 13 status

Parameter

Type

Description

id

Integer

Definition:

Work item status ID.

Options:

N/A

name

String

Definition:

Work item priority name.

Options:

N/A

Table 14 tracker

Parameter

Type

Description

id

Integer

Definition:

Work item type ID.

Options:

N/A

name

String

Definition:

Work item type name.

Options:

N/A

Status code: 400

Table 15 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

N/A

error_msg

String

Definition:

Error description.

Value range:

N/A

Status code: 401

Table 16 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

N/A

error_msg

String

Definition:

Error description.

Value range:

N/A

request_id

String

Definition

Request ID, which is automatically generated by the system.

Range

N/A

Example Requests

POST https://{endpoint}/v4/issues

{
  "offset" : "0",
  "limit" : "15",
  "status_id" : "5",
  "due_date" : "1682265600000,1682265600000"
}

Example Responses

Status code: 200

{
  "issue_list" : [ {
    "id" : 1377838,
    "subject" : "fe111",
    "parent_issue_id" : 1377837,
    "parent_issue" : {
      "id" : 1377837,
      "subject" : "epic111"
    },
    "project" : {
      "name" : "Scrum0630001",
      "id" : 527,
      "identifier" : "ddb260aa69b848599747eadfa632a40f",
      "type" : "scrum"
    },
    "done_ratio" : 0,
    "expected_work_hours" : 0,
    "actual_work_hours" : 1,
    "tracker" : {
      "id" : 6,
      "name" : "Feature"
    },
    "order" : {
      "id" : 1,
      "name" : "1.0"
    },
    "severity" : {
      "id" : 12,
      "name" : "Minor"
    },
    "priority" : {
      "id" : 2,
      "name" : "Medium"
    },
    "domain" : { },
    "position" : 1377838,
    "module" : { },
    "assigned_to" : {
      "id" : 83,
      "name" : "CodeArtsReq_creq_chm1",
      "identifier" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "image_id" : "photo01.png",
      "first_name" : "creq_chm1",
      "last_name" : "creq_chm1"
    },
    "author" : {
      "id" : 83,
      "name" : "CodeArtsReq_creq_chm1",
      "identifier" : "d3775f2d201f423f9eeaa0b06f8f1b8f",
      "image_id" : "photo01.png",
      "author_nick_name" : "creq_chm1",
      "first_name" : "creq_chm1",
      "last_name" : "creq_chm1"
    },
    "developer" : {
      "id" : 0
    },
    "closeder" : {
      "id" : 0
    },
    "status" : {
      "id" : 1,
      "name" : "Initial"
    },
    "is_watcher" : false,
    "closed_flag" : 0,
    "deleted" : false,
    "created_on" : "1782788317000",
    "updated_on" : "1782788317000"
  } ],
  "total" : 1
}

SDK Sample Code

The SDK sample code is as follows.

Java

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.projectman.v4.region.ProjectManRegion;
import com.huaweicloud.sdk.projectman.v4.*;
import com.huaweicloud.sdk.projectman.v4.model.*;


public class SearchIssuesSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");

        ICredential auth = new BasicCredentials()
                .withAk(ak)
                .withSk(sk);

        ProjectManClient client = ProjectManClient.newBuilder()
                .withCredential(auth)
                .withRegion(ProjectManRegion.valueOf("<YOUR REGION>"))
                .build();
        SearchIssuesRequest request = new SearchIssuesRequest();
        ListWorkTableIssueRequestV4RequestBody body = new ListWorkTableIssueRequestV4RequestBody();
        body.withStatusId("5");
        body.withDueDate("1682265600000,1682265600000");
        body.withLimit(15);
        body.withOffset(0);
        request.withBody(body);
        try {
            SearchIssuesResponse response = client.searchIssues(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}

Python

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkprojectman.v4.region.projectman_region import ProjectManRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkprojectman.v4 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]

    credentials = BasicCredentials(ak, sk)

    client = ProjectManClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(ProjectManRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = SearchIssuesRequest()
        request.body = ListWorkTableIssueRequestV4RequestBody(
            status_id="5",
            due_date="1682265600000,1682265600000",
            limit=15,
            offset=0
        )
        response = client.search_issues(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)

Go

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    projectman "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")

    auth, err := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        SafeBuild()

    if err != nil {
        fmt.Println(err)
        return
    }

    hcClient, err := projectman.ProjectManClientBuilder().
         WithRegion(region.ValueOf("<YOUR REGION>")).
         WithCredential(auth).
         SafeBuild()


    if err != nil {
        fmt.Println(err)
        return
    }

    client := projectman.NewProjectManClient(hcClient)

    request := &model.SearchIssuesRequest{}
	statusIdListWorkTableIssueRequestV4RequestBody:= "5"
	dueDateListWorkTableIssueRequestV4RequestBody:= "1682265600000,1682265600000"
	limitListWorkTableIssueRequestV4RequestBody:= int32(15)
	offsetListWorkTableIssueRequestV4RequestBody:= int32(0)
	request.Body = &model.ListWorkTableIssueRequestV4RequestBody{
		StatusId: &statusIdListWorkTableIssueRequestV4RequestBody,
		DueDate: &dueDateListWorkTableIssueRequestV4RequestBody,
		Limit: &limitListWorkTableIssueRequestV4RequestBody,
		Offset: &offsetListWorkTableIssueRequestV4RequestBody,
	}
	response, err := client.SearchIssues(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

More

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.