Updated on 2025-03-25 GMT+08:00

Querying the Microservice List

Function

This API is used to query the microservice list.

Calling Method

For details, see Calling APIs.

URI

POST /v2/{cloudProjectId}/component/list/query

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

cloudProjectId

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

offset

Yes

Integer

Offset.

limit

Yes

Integer

Size.

name

No

String

Microservice name.

sort_dir

No

String

Sorting direction.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

Array of ComponentVO objects

Data.

total

Integer

Total number of records.

Table 4 ComponentVO

Parameter

Type

Description

id

String

Microservice ID.

name

String

Microservice name.

type

String

Type.

description

String

Description.

status

String

Status.

parent_id

String

Parent ID.

cloud_project_id

String

Project ID.

repos

Array of ComponentRepoVO objects

Microservice code repository.

is_followed

Boolean

Whether the component is added to favorites.

creator_id

String

Creator ID.

creator_name

String

Creator name.

create_time

String

Creation time.

updater_id

String

Updater ID.

updater_name

String

Updater name.

update_time

String

Update time.

Table 5 ComponentRepoVO

Parameter

Type

Description

type

String

Type.

repo_id

String

Repo repository ID.

http_url

String

Repository HTTP address.

git_url

String

Repository Git address.

branch

String

Branch.

language

String

Language.

endpoint_id

String

Endpoint ID.

Example Requests

GET https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/component/list/query

{
  "offset" : 0,
  "limit" : 10,
  "name" : "",
  "sort_dir" : ""
}

Example Responses

Status code: 200

Response body for querying the microservice list.

{
  "data" : [ {
    "id" : "f7ced2341b204d2b82c607c6f0de5b4a",
    "name" : "11",
    "type" : "microservice",
    "description" : null,
    "status" : "active",
    "parent_id" : null,
    "cloud_project_id" : "2d09f712e9504b61b034cc8f40e475a8",
    "repos" : null,
    "is_followed" : true,
    "creator_id" : "05d8ca972f114765a8984795a8aa4d41",
    "creator_name" : "north-5",
    "create_time" : "1709260209",
    "updater_id" : "05d8ca972f114765a8984795a8aa4d41",
    "updater_name" : "north-5",
    "update_time" : "1719319144"
  } ],
  "total" : 1
}

Status Codes

Status Code

Description

200

Response body for querying the microservice list.

Error Codes

See Error Codes.