Updated on 2024-07-05 GMT+08:00

Querying a Group List

Function

This API is used to query a group list.

Calling Method

For details, see Calling APIs.

URI

GET /v1/projects/{project_id}/applications/groups

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

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.

Minimum: 0

Maximum: 20000

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

result

Array of AppGroupsEntity objects

Group information list

status

String

Request success or failure status

Table 4 AppGroupsEntity

Parameter

Type

Description

id

String

Group ID

name

String

Group name

project_id

String

Project ID

path

String

Group path

parent_id

String

Parent group ID. The ID of the first level is null.

ordinal

Integer

Group sorting field

create_user_id

String

ID of the group creator

last_update_user_id

String

ID of the user who last updates the group

count

Integer

Total number of applications in the group

children

Array of AppGroupsEntity objects

Child group list

Example Requests

https://{endpoint}/v1/projects/0a38ce9ba3c740c199a0f872b6163661/applications/groups

Example Responses

Status code: 200

OK: The request is successful.

{
  "result" : [ {
    "project_id" : "0a38ce9ba3c740c199a0f872b6163661",
    "path" : "55ad749142fc405398aad372a1f9eff1",
    "parent_id" : null,
    "ordinal" : 1,
    "name" : "group_1",
    "last_update_user_id" : "057842a25b000f6b1fcbc014a9cccccc",
    "id" : "55ad749142fc405398aad372a1f9eff1",
    "create_user_id" : "057842a25b000f6b1fcbc014a9cccccc",
    "count" : 0,
    "children" : [ ]
  } ],
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.