Help Center/ CodeArts Req/ API Reference/ APIs/ Modules of the Scrum Project/ Querying the Module List of a Project
Updated on 2023-06-12 GMT+08:00

Querying the Module List of a Project

Function

Querying the Module List of a Project

URI

GET /v4/projects/{project_id}/modules

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the 32-bit ID of the devcloud project.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Query offset.

Default: 0

limit

No

Integer

Data returned at a time. The value ranges from 1 to 100.

Minimum: 1

Maximum: 100

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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total Number of Modules

modules

Array of ProjectModule objects

Module

Table 5 ProjectModule

Parameter

Type

Description

module_id

Integer

Specifies the module ID.

module_name

String

Module

owner

ModuleOwner object

deepth

Integer

Module Level

is_parent

Boolean

Indicates whether a module is a parent module. The options are true (parent module) and false (non-parent module).

children

Array of ProjectChildModule objects

Submodule Information

Table 6 ProjectChildModule

Parameter

Type

Description

module_id

Integer

Specifies the module ID.

module_name

String

Module name

owner

ModuleOwner object

deepth

Integer

Module Level

is_parent

Boolean

Indicates whether a module is a parent module. The options are true (parent module) and false (non-parent module).

parent_module_id

Integer

Parent module ID.

Table 7 ModuleOwner

Parameter

Type

Description

user_id

String

User ID, which is a 32-digit character string.

user_num_id

Integer

User ID

user_name

String

Username.

nick_name

String

Nickname of the user.

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/0792b7d26cb74bd799cbae80063dc74a/modules

Example Responses

Status code: 200

OK

{
  "total" : 1,
  "modules" : [ {
    "module_id" : 1,
    "module_name" : "demo",
    "owner" : {
      "user_id" : "09d75cde5180d4481f91c018e89cb8e2",
      "user_num_id" : 4091,
      "user_name" : "demo_user_name_06",
      "nick_name" : "demo"
    },
    "deepth" : 1,
    "is_parent" : true,
    "children" : [ {
      "module_id" : 1,
      "module_name" : "demo",
      "owner" : {
        "user_id" : "09d75cde5180d4481f91c018e89cb8e2",
        "user_num_id" : 4091,
        "user_name" : "demo_user_name_06",
        "nick_name" : "demo"
      },
      "deepth" : 1,
      "is_parent" : true,
      "parent_module_id" : 1
    } ]
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.