Querying the Module Tree Diagram
Function
This API is used to query the module tree diagram.
Calling Method
For details, see Calling APIs.
URI
GET /v1/ipdprojectservice/projects/{project_id}/modules/tree
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: 32-character UUID of a project, which uniquely identifies a project. Obtain the value of this parameter from the project_id field in the response body of the Querying the Project List API. Constraints: Regular expression: ^[A-Za-z0-9]{32}$ Options: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key_word |
No |
String |
Definition: Currently, only search by name keyword is supported. Constraints: N/A Options: N/A Default value: N/A |
sort |
No |
String |
Definition: Sorting rule. By default, the creation time (descending) is used, that is, the latest creation is displayed on the top. Constraints: N/A Options: N/A Default value: created_date |
sort_type |
No |
String |
Definition: Sorting mode. The value can be asc or desc. asc indicates ascending order and desc indicates descending order. The default value is desc. Constraints: N/A Options: asc and desc Default value: desc |
offset |
No |
Integer |
Definition: Start page number. The value starts from 0 and is an integer multiple of limit. The default value is 0. Constraints: N/A Options: Minimum value: 0. Maximum value: 350 Default value: 0 |
limit |
No |
Integer |
Definition: Number of records displayed on each page Constraints: N/A Options: Minimum value: 1. Maximum value: 100. Default value: 10 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
ModuleListResult object |
Definition: Module list. |
status |
String |
Definition: Query result status. Options: N/A |
message |
String |
Definition: Error message. Options: N/A |
Parameter |
Type |
Description |
---|---|---|
modules |
Array of ModuleEntity objects |
Definition: Module list. |
total |
Integer |
Definition: Total number of modules. A maximum of 350 modules (including sub-modules) are allowed in a project. Options: Maximum value: 350. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition: Module ID. Options: N/A |
sequence |
String |
Definition: Module sequence value, which is of the double type. Options: N/A |
level |
Integer |
Definition: Module level. A maximum of three levels are supported. Options: 1, 2, and 3 |
description |
String |
Definition: Module description. Options: N/A |
created_by |
String |
Definition: Module creator ID. Options: N/A |
created_time |
String |
Definition: Creation time, which is a Unix timestamp (unit: millisecond). Options: N/A |
modified_by |
String |
Definition: ID of the last modifier of the module. Options: N/A |
modified_time |
String |
Definition: Last modification time of a module, which is a Unix timestamp (unit: millisecond). Options: N/A |
display_value |
String |
Definition: Module display name. Options: N/A |
path_name |
String |
Definition: Path name of the sub-module. Options: N/A |
value |
String |
Definition: Unique ID of a module. You can customize the value and ID of a module. Options: N/A |
parent_id |
String |
Definition: Parent module ID. Options: N/A |
child_modules |
Array of ModuleEntity objects |
Definition: Child module information. |
assignee |
String |
Definition: Module owner ID. Options: N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
https://{endpoint}/v1/ipdprojectservice/projects/336ad84c67ea4783b2edc1bb5a112da0/modules/tree?offset=0&limit=20&sort_type=asc
Example Responses
Status code: 200
OK
{ "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 message.
{ "error_code" : "PM.02174103", "error_msg" : "Incorrect pagination parameter." }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Error message. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot