Help Center/ CodeArts Req/ API Reference/ API/ IPD Module Management/ Querying the Module Tree Diagram
Updated on 2026-10-27 GMT+08:00

Querying the Module Tree Diagram

Function

This API is used to query the tree structure of modules under a project in pagination mode. Fuzzy search by keyword, sorting, and pagination are supported.

Calling Method

For details, see Calling APIs.

Authorization Information

No identity policy-based permission required for calling this API.

URI

GET /v1/ipdprojectservice/projects/{project_id}/modules/tree

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

32-character ID of a project, which must be unique. Obtain the value by calling the API for querying the IPD project list. The value of id in the response message body is the project ID.

Constraints

N/A

Range

A string of 32 characters consisting of letters and digits.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

key_word

No

String

Definition

Module name keyword, which is used for fuzzy search.

Constraints

N/A

Range

Max. 128 characters.

Default Value

N/A

sort

No

String

Definition

Sorting field. By default, the creation time (descending) is used, that is, the latest creation is displayed on the top.

Constraints

N/A

Range

  • display_value: sorted by module name

  • description: sorted by description

  • assignee: sorted by owner

  • created_date: sorted by creation time

Default Value

created_date

sort_type

No

String

Definition

Sorting mode, which is used together with the sort field and takes effect only when sort is specified.

Constraints

sort_type takes effect only when sort is specified.

Range

  • asc: ascending.

  • desc: descending.

Default Value

desc

offset

No

Integer

Definition

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

Constraints

The value must be a multiple of limit.

Range

0–350

Default Value

0

limit

No

Integer

Definition

Number of modules returned on each page.

Constraints

N/A

Range

1 to 100

Default Value

10

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

result

ModuleListResult object

Definition

Module tree list query result.

Range

N/A

status

String

Definition

Response status identifier.

Range

  • success: The module tree list is queried successfully.

  • error: The module tree list fails to be queried.

message

String

Definition

Error message.

Range

Max. 1,024 characters.

Table 4 ModuleListResult

Parameter

Type

Description

modules

Array of ModuleEntity objects

Definition

Module list. Each module is a ModuleEntity object.

total

Integer

Definition

Total number of modules. A maximum of 350 modules (including sub-modules) are allowed in a project.

Range

0–350

Table 5 ModuleEntity

Parameter

Type

Description

id

String

Definition

Unique module ID.

Range

A string of 18 to 19 digits.

sequence

String

Definition

Module sequence value, which is used for sorting. The value is a string of the double type.

Range

N/A

level

Integer

Definition

Module level depth.

Range

1–3

description

String

Definition

Module description.

Range

Max. 10,000 characters.

created_by

String

Definition

ID of the module creator.

Range

32 characters.

created_time

String

Definition

Creation time, which is a Unix timestamp (unit: millisecond).

Range

A string of 13 to 19 digits.

modified_by

String

Definition

ID of the latest modifier of the module.

Range

32 characters.

modified_time

String

Definition

Last modification time of a module, which is a Unix timestamp (unit: millisecond).

Range

A string of 13 to 19 digits.

display_value

String

Definition

Module display name.

Range

2 to 256 characters.

path_name

String

Definition

Complete path name of a submodule, which consists of module names at all levels separated by slashes (/).

Range

Max. 769 characters.

value

String

Definition

Unique ID of a module. The value and ID of a custom module are the same.

Range

Max. 32 characters.

parent_id

String

Definition

Parent module ID.

Range

A string of 18 to 19 digits.

child_modules

Array of ModuleEntity objects

Definition

Submodule list. Each submodule is also a ModuleEntity object.

assignee

String

Definition

Module owner ID.

Range

32 characters.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Range

N/A

error_msg

String

Definition

Error description, which is a supplement to error_code.

Range

N/A

Example Requests

GET https://{endpoint}/v1/ipdprojectservice/projects/336ad84c67ea4783b2edc1bb5a112da0/modules/tree?offset=0&limit=20&sort_type=asc

Example Responses

Status code: 200

{
  "status" : "success",
  "message" : null,
  "result" : {
    "modules" : [ {
      "id" : "958663834527117312",
      "sequence" : "1.0",
      "level" : 1,
      "description" : "aaaa",
      "created_by" : "a360371833bf4c558f796fd707b44daf",
      "created_time" : "1706492869000",
      "modified_by" : "a360371833bf4c558f796fd707b44daf",
      "modified_time" : "1706492869000",
      "display_value" : "Module A",
      "path_name" : "Module A",
      "value" : "958663834527117312",
      "child_modules" : [ {
        "id" : "958663880396025857",
        "sequence" : "1.0",
        "level" : 2,
        "description" : "aaa1",
        "created_by" : "a360371833bf4c558f796fd707b44daf",
        "created_time" : "1706492880000",
        "modified_by" : "a360371833bf4c558f796fd707b44daf",
        "modified_time" : "1706492880000",
        "display_value" : "Module A-1",
        "path_name" : "Module A/Module A-1",
        "value" : "958663880396025857",
        "parent_id" : "958663834527117312",
        "child_modules" : [ {
          "id" : "958663903372423168",
          "sequence" : "1.0",
          "level" : 3,
          "description" : "",
          "created_by" : "a360371833bf4c558f796fd707b44daf",
          "created_time" : "1706492885000",
          "modified_by" : "a360371833bf4c558f796fd707b44daf",
          "modified_time" : "1706492885000",
          "display_value" : "Module A-1-1",
          "path_name" : "Module A/Module A-1/Module A-1-1",
          "value" : "958663903372423168",
          "parent_id" : "958663880396025857",
          "assignee" : "a360371833bf4c558f796fd707b44daf"
        } ],
        "assignee" : "a360371833bf4c558f796fd707b44daf"
      } ],
      "assignee" : "a360371833bf4c558f796fd707b44daf"
    } ],
    "total" : 1
  }
}

Status code: 400

{
  "error_code" : "PM.02174103",
  "error_msg" : "Incorrect pagination parameter."
}

Status Codes

Status Code

Description

200

OK

400

Error message.

Error Codes

See Error Codes.