Updated on 2023-08-02 GMT+08:00

Obtaining the Component List

Function

This API is used to obtain the component list.

URI

GET /v1/apm2/openapi/cmdb/apps/get-apps

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

business_id

Yes

Long

Application ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

x-business-id

Yes

Long

Application ID.

X-Auth-Token

Yes

String

User token obtained from IAM.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

apps

Array of AppNodeModel objects

Component information list.

Table 4 AppNodeModel

Parameter

Type

Description

id

Long

Component ID.

gmt_create

String

Creation time.

gmt_modify

String

Update time.

name

String

Component name.

business_id

Long

Application ID.

sub_business_id

Long

Sub-application ID.

inner_domain_id

Integer

Tenant ID.

Example Requests

Query the component list of application 162.

/v1/apm2/openapi/cmdb/apps/get-apps?business_id=162

Example Responses

Status code: 200

OK: The request is successful.

{
  "apps" : [ {
    "id" : 11,
    "gmt_create" : null,
    "gmt_modify" : null,
    "name" : "apm-pu-task",
    "business_id" : 162,
    "sub_business_id" : 55,
    "inner_domain_id" : null
  } ]
}

Status Codes

Status Code

Description

200

OK: The request is successful.

401

Unauthorized: No permissions.

403

Forbidden: Access forbidden.

404

Not Found: The requested resource is not found.

Error Codes

See Error Codes.