Updated on 2025-10-24 GMT+08:00

Querying a Component

Function

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

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:application:list

    List

    application *

    -

    -

    -

URI

GET /v1/components

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

application_id

No

String

Definition:

Application ID.

Constraints:

N/A

Value 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

Value 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

Value range:

It is user-defined. The value ranges from 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.

Value range:

N/A

Table 3 data

Parameter

Type

Description

id

String

Definition:

UUID allocated by COC-CMDB.

Value range:

N/A

name

String

Definition:

Component name.

Value range:

N/A

code

String

Definition:

Component code.

Value range:

N/A

domain_id

String

Definition:

Tenant ID.

Value range:

N/A

application_id

String

Definition:

Application ID.

Value range:

ID of the application where the component is located.

ep_id

String

Definition:

Enterprise project ID.

Value range:

Select a project ID that is available inEnterprise Management.

Example Requests

This API is used to 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.