Obtaining the Environment List of a Component
Function
This API is used to obtain the environment list of a component.
URI
GET /v1/apm2/openapi/cmdb/envs/get-app-envs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_id |
Yes |
Long |
Component 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 |
---|---|---|
envs |
Array of EnvNodeModel objects |
Environment information list. |
Parameter |
Type |
Description |
---|---|---|
id |
Long |
Environment ID. |
gmt_create |
String |
Creation time. |
gmt_modify |
String |
Update time. |
app_id |
Long |
Component ID. |
business_name |
String |
Application name. |
inner_domain_id |
Integer |
Tenant ID. |
name |
String |
Environment name. |
is_default |
Boolean |
Whether the environment is a default environment. |
app_name |
String |
Component name. |
business_id |
Long |
Application ID. |
region |
String |
Region. |
Example Requests
Obtain the environment list of component 11.
/v1/apm2/openapi/cmdb/envs/get-app-envs?app_id=11
Example Responses
Status code: 200
OK: The request is successful.
{ "envs" : [ { "id" : 11, "gmt_create" : null, "gmt_modify" : null, "app_id" : 11, "business_name" : null, "inner_domain_id" : null, "name" : "suzhou-roma-2", "is_default" : false, "app_name" : null, "business_id" : 162, "region" : "suzhou-roma-2" } ] }
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.
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