Obtaining the Component List
Function
This API is used to obtain the component list.
URI
GET /v1/apm2/openapi/cmdb/apps/get-apps
Parameter | Mandatory | Type | Description |
---|---|---|---|
business_id | Yes | Long | Application ID. |
Request 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
Parameter | Type | Description |
---|---|---|
apps | Array of AppNodeModel objects | Component information list. |
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. |
data_source | String | Data source. |
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": [{"default": false,"id": 779867,"gmt_create": null,"gmt_modify": null,"is_default": false,"display_name": "CPC-CCE","data_source": null,"inner_domain_id": 2,"name": "CPC-CCE","eps_id": "46f46a1d-2f53-4e06-93e1-9af877f4cddf","cmdb_datasource_type": "APM"},{"default": false,"id": 780124,"gmt_create": null,"gmt_modify": null,"is_default": false,"display_name": "vyemoql","data_source": null,"inner_domain_id": 2,"name": "vyemoql","eps_id": "0","cmdb_datasource_type": "APM"},]}
Status Codes
Status Code | Description |
---|---|
200 | OK: The request is successful. |
400 | Bad Request: Semantic or parameter error. |
401 | Unauthorized: No permissions. |
403 | Forbidden: Access forbidden. |
404 | Not Found: The requested resource is not found. |
Error Codes
See Error Codes.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Requests
- Example Responses
- Status Codes
- Error Codes