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 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
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
Array of data objects |
Definition: List of component query information. Value range: N/A |
|
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.
Feedback
Was this page helpful?
Provide feedbackThank 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