Updated on 2025-12-05 GMT+08:00

Querying a Component

Function

This API is used to query sub-applications or components based on different scenarios.

URI

GET /v1/components

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

application_id

No

String

Definition

Application ID.

Constraints

N/A

Range

ID of the application for the component. There is a clear hierarchy between them.

Default value

N/A

marker

No

String

Definition

It is used for pagination query.

Constraints

N/A

Range

ID of the last record in the previous query.

Default value

N/A

limit

Yes

Integer

Definition

Number of items displayed on each page when the pagination query is performed.

Constraints

N/A

Range

The value can be customized. The value range is 1 to 500.

Default value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

Array of data objects

Definition

List of component query information.

Range

N/A

Table 3 data

Parameter

Type

Description

id

String

Definition

UUID allocated by COC-CMDB.

Range

N/A

name

String

Definition

Component name.

Range

N/A

code

String

Definition

Component code.

Range

N/A

domain_id

String

Definition

Tenant ID.

Range

N/A

application_id

String

Definition

Application ID.

Range

ID of the application where the component is located.

ep_id

String

Definition

Enterprise project ID.

Range

Select a project ID that is available inEnterprise Management.

Example Requests

Query component information.

GET https://{Endpoint}/v1/components

Example Responses

Status code: 200

The component information is queried.

{
  "data" : [ {
    "id" : "string",
    "name" : "string",
    "code" : "string",
    "domain_id" : "string",
    "application_id" : "string",
    "ep_id" : "string"
  } ]
}

Status Codes

Status Code

Description

200

The component information is queried.

Error Codes

See Error Codes.