Updated on 2025-08-22 GMT+08:00

Querying a Group Tree

Function

This API is used to query a group tree.

Calling Method

For details, see Calling APIs.

URI

GET /v1/job/{project_id}/group/tree

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

CodeArts project ID. For details about how to obtain the CodeArts project ID, see Obtaining a CodeArts Project ID.

Constraints

N/A.

Range

Use a 32-character string containing a mix of digits and letters.

Default Value

N/A.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

result

Array of JobGroupTreeResponseBody objects

Returned result.

error

String

Returned error message.

status

String

Returned status information.

Table 3 JobGroupTreeResponseBody

Parameter

Type

Description

id

String

Group ID.

domain_id

String

Tenant ID.

project_id

String

CodeArts project ID. ID of the project to which the build task belongs.

name

String

Group name.

parent_id

String

Parent group ID.

path_id

String

Group path.

ordinal

Integer

Ordinal.

create_user

String

User who creates the group.

update_user

String

User who updates the group.

create_time

String

Creation time.

update_time

String

Update time.

children

Array of JobGroupTreeResponseBody objects

Child group.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

GET https://{endpoint}/v1/job/{project_id}/group/tree

Example Responses

Status code: 200

OK

{
  "result" : [ {
    "id" : "b13c933bbc6f4d09a98ef09e4cc07e17",
    "domain_id" : "60021bab32fd450aa2cb89226f425e06",
    "project_id" : "923785f9674548259144259077bc6a98",
    "name" : "New group-2160794",
    "parent_id" : null,
    "path_id" : "b13c933bbc6f4d09a98ef09e4cc07e17",
    "ordinal" : 0,
    "create_user" : "devcloud_codeci_z00485259_02",
    "update_user" : null,
    "create_time" : "2025-06-05T07:06:50+0800",
    "update_time" : null,
    "children" : [ {
      "id" : "e2c52ec7654948c09e635697a4ffcb59",
      "domain_id" : "60021bab32fd450aa2cb89226f425e06",
      "project_id" : "923785f9674548259144259077bc6a98",
      "name" : "2225 (Group testing)",
      "parent_id" : "b13c933bbc6f4d09a98ef09e4cc07e17",
      "path_id" : "b13c933bbc6f4d09a98ef09e4cc07e17.e2c52ec7654948c09e635697a4ffcb59",
      "ordinal" : 7,
      "create_user" : "devcloud_codeci_z00485259_02",
      "update_user" : null,
      "create_time" : "2025-06-10T09:50:28+0800",
      "update_time" : null,
      "children" : null
    }, {
      "id" : "70e158b6054e442893d7f5a79d34ce61",
      "domain_id" : "60021bab32fd450aa2cb89226f425e06",
      "project_id" : "923785f9674548259144259077bc6a98",
      "name" : "New group (237)",
      "parent_id" : "b13c933bbc6f4d09a98ef09e4cc07e17",
      "path_id" : "b13c933bbc6f4d09a98ef09e4cc07e17.70e158b6054e442893d7f5a79d34ce61",
      "ordinal" : 6,
      "create_user" : "devcloud_codeci_z00485259_02",
      "update_user" : "devcloud_codeci_z00485259_02",
      "create_time" : "2025-06-09T02:55:39+0800",
      "update_time" : "2025-06-09T02:58:36+0800",
      "children" : null
    } ]
  } ],
  "error" : null,
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.