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
| 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
| Parameter | Type | Description |
|---|---|---|
| data | Array of data objects | Definition List of component query information. Range N/A |
| 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 in Enterprise Management. |
Example Requests
Query component information.
GET https://{Endpoint}/v1/components Example Responses
Status code: 200
{
"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.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot